to the login page, add a restrict access behavior. Go to WebAssist -> Security Assist -> Secure Page.
from the Grant Access If list, select the "Not Logged in to <Name of your users table>" Rule (where <Name of your users table> is the name of your users table).
Set the redirect to point to the home pagew.
you may need to re order the code so that the Clear Session Variable code is before the restrict access code.