Tough to do. You can get close if your login method times people out after a certain amount of time:
1) User logs in; script sets timestamp.
2) Everytime user views another page and hasn't timed out, reset the timestamp.
You can then run a script to check the timestamps to view all that are within your timeout period, meaning they are still active.
-- Rich