That's not a JavaScript thing but a server side thing, and whether it's doable or not depends on the forum software. Anyways, moving this issue to the server side guys.
normally, for such feature, you'd just record each login (including cookielogins) into a database-table.
then you just run a select to get all users where the last (max()) logindate is today.