If you are using Dreamweaver's Log In User server behavior, then it creates a session variable named MM_Username (Session.MM_Username) that contains the user name from the log in form. When that variable exists and is not an empty string, then the user is considered logged in. All you should need to do is to check for the existance of that vairable and it not being an empty string.
My CF is rusty, and I don't have a system with ColdFusion installed to be able to give you tested code, but it should be something along the lines of the following:
<cfif IsDefined(Session.MM_Username) And Session.MM_Username NEQ "">
Logout link here
<cfelse>
Log in link here
</cfif>
FYI: The Log Out User server behavior sets that session variable to an empty string rather than destroying the variable, that's why you need to check for it not being an empty string using the Dreamweaver Log in/out server behaviors.