One other thing - it's technically difficult and expensive to do this. Just registering a user as online if they're signed in isn't going to be accurate. I haven't signed out in months, but I'm not on this site 24/7 - so doing it that way would be grossly inaccurate. To do it right, you need a javascript to poll the page periodically to determine if it's visible (on screen, not under another window, has focus...that sort of thing....actively in-use) and then report that back to the server when it changes.
The code looks like this:
window.addEventListener('visibilityChange', function (e) {
switch(document.hidden) {
case "undefined":
// do something when the page is hidden
break;
default:
// do something when the page is visible
break;
}
});
That's where it gets expensive. Just switching tabs to check your gmail sends a message to the site to say you're offline, you switch back and now you're online again...another message. If you're like me, you might have 3 or 4 imgflip tabs open. Switching between them sends the online/offline messages for each tab closed and opened. I don't know the number of simultaneous users this site has at any given time, but I'd wager that during primetime it's in the thousands. That's a lot of status updates to process - 1000 users switching online status every time they switch tabs or pause to check their email, or when the screensaver kicks on because they're peeing....
I do this stuff for a living, and I have to talk customers out of silly things like this - usually I do it with a cost analysis. "Ok, so this change you're asking for will require that I scale the cluster by X number of instances which translates to $Y per month" - usually it's something frivolous and they opt out. There isn't a good reason for users to want it, and there isn't a business reason to have it. It's going to cause trouble for the users, and it's going to increase operation costs.