did you look at the [man]session_set_save_handler/man function? it makes it real easy to build your own wrapper for php's sessions.
by default, php saves session data in text files on the server. buy using session_set_save_handler() you can save session data to a db instead. making it much easier to keep track of users.
of course, you could just set a clookie when a user logs in, then if they try to login again and already have the cookie set, fail there 2nd login.