This example shows how I set session variables for a login page. I hope it helps or offers some insight.
<CFSET Session.LoggedIn = FALSE>
<--Then, I created a query that logs in users and appropriately resets the sessions variable(s) after it checks security level/validates passwords, etc-->
<cfquery name="QueryName" datasource="#DSN#" dbtype="ODBC">
SELECT *
FROM YourTable
WHERE (UserId = '#form.UserID#') AND (Password = '#form.password#')</cfquery>
<cfif QueryName.Record GREATER THAN 0>
<CFIF QueryName.Password IS "#Form.Password#">
<CFSET Session.LoggedIn = TRUE>
<CFSet Session.UserID="#Form.UserID#">
<CFSet Session.Security="#QueryName.AuthCode#">
<CFSET Session.AddToken = "cfid=#cfid#&cftoken=#cftoken#">
<CFELSE>
<CFSET Reason = "The password you typed is invalid. Please Try again">
</CFIF>
<CFELSE>
<CFOUTPUT>
<CFSET Reason = Type your message here like unable to validate user named #Form.UserID#'>
</CFOUTPUT>
</CFIF>
<CFIF Session.LoggedIn>
<cflocation url="YourCFPage.cfm" addtoken="Yes">
<cfelse>
<CFOUTPUT>
<Script>
alert("Sorry! Your login was unsuccessful"

;
self.location="WhateverPageYouWantHere.cfm";
</script>
</cfoutput>
</cfif>