use an additional column in your users table with a name like Login_Status etc. update this column on login and logout. of course there is a problem, which is the user closing the browser window without logging of. At this time, use the session_end(available in Global.asax.{
vb/cs} file of your application) and update the Login_Status column of the table.