you have to build your own session control.
see in the session section of the manual.
You can create a session management in the database, and then, when the user logins you create an entry for saving the session data and other information you need.
When you destroy the session you also delete the record or do what you want to say he's logged of.
You can also build the garbage_collect function to clean up junk.
But, there's one thing. Suppose that there's a IE crash and the browser closes (you MUST prevent this) you don't know that the user closed the window ... Well you can do another thing. If a user logins and closes the browser without logging out. If he logins again, let him go, but close his previous connection.
Using sessions, the user can open multiple windows with the same session_id if he opens by CTRL+N or file->new or anything similar, but if he opens a new instance of the browser the session_id will be different.
You can use cookies too. If a user closes the window, he can get back again and stay logged in. But it's not the best way.
Well, finaly my advise. Use a self session control to control the sessions, and if a user loggins twice, just log the first out automatically. If the old one is still in use, just send a message in the next page call saing "Your session was terminated because you logged in a different location/browser.".
Hope this helps you out. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com