I have a page in my application which always shows updated list of online users. Now, to keep the list-which is stored in application object- updated, i do the below steps>
Use Ajax to send "I am still online" message to the server in every 30 seconds. This is the best way to find who is really online.