Everyone has excellent suggestions. I thought I might add to some.
Sessions are the best way to maintain which users are logged in and which are not. There is a Session Object that you can download for a 30Day trial.
Go Here.
Now, I like this Session Object because it does a couple of things. It tracks the Session Data in a Database. Duh! But it also keep track of the Expiration Time of Session Information automatically for you.
Add the Session Object to the Global.ASA. This will keep track of Session Start and End For you. The load on the server is minimal because it is only one object being stored per user. Then, with this object, on Session and Application Close, you can clean the Session Table, which logs users out.
Below is a sample of what my Global.asa file looks like with this Session Object.
<OBJECT ID="AppSession" Runat="Server" SCOPE="Application" ProgID="Sessions.CSession"></OBJECT>
<OBJECT ID="oSession" Runat="Server" SCOPE="Session" ProgID="Sessions.CSession"></OBJECT>
<!--#Include File = "Includes/DataConn.asp"-->
<SCRIPT RUNAT="SERVER" LANGUAGE="vbscript">
Sub Application_onStart()
AppSession.Init "AppSessionVariable", cDSN, cUserName, cPassword, cConnectionString, "", "TRIAL_ID_HERE"
End Sub
Sub Application_onEnd()
'Code will cleanup the Session Table
AppSession.DeleteSession
AppSession.DeleteExpiredSessions
End Sub
Sub Session_onStart()
'Set Up the Session Object
Dim sUserSession 'As String
sUserSession = Request.Cookies("fWSession"

oSession.Init sUserSession, cDSN, cUserName, cPassword, cConnectionString, "", "TRIAL_ID_HERE"
End Sub
Sub Session_onEnd()
oSession.DeleteSession
End Sub
</SCRIPT>
oSession and AppSession are available to my project throughout to add and remove data as I please. Works like a charm. Hope this helps.
Osie Brown