[eluser]TheFuzzy0ne[/eluser]
You're best bet is to log a timestamp to the database every time a logged in user makes a request to your server. The find out who's logged in, you can look for timestamps that are less than say 10 minutes ago, and that should tell you who's logged in. Or, you can set the session to timeout after several hours, and check for timestamps that are less than the current time minus the max session time.
Sorry Dam1an, but the poor guy just wanted an idea, not a library that's been created for him.