Users get to the login form after clicking logout, but the session variables aren't really cleared/the session isn't really over.
Here's the way I set the session if they've entered a correct un/pw:
<!--- Remember user's logged-in status, plus ---> <!--- ContactID and First Name, in structure ---> <CFSET SESSION.Auth = StructNew()> <CFSET SESSION.Auth.IsLoggedIn = "Yes"> <CFSET SESSION.Auth.UserName = FORM.UserLogin> <CFSET SESSION.Auth.Password = FORM.UserPassword>
<!--- Now that user is logged in, send them ---> <!--- to whatever page makes sense to start ---> <CFLOCATION URL="index.cfm?bg=2">
A URL variable (LogoutNow) activates the StructClear to delete session variables, but users can still access the pages if they type in the URL. Here's the code I'm using in application.cfm to delete the session: