How to show if users are online

So this is an optional extra I would like on one of my backend systems to see what staff are logged in.
I have currently figured a way of doing it, however it is reliant on the user logging out.
Problem is unless they click the logout button they still remain logged in (for example if they just close the window).
Is there a way that if the window is closed or the computer is shut down then it could automatically log them out?
Site is NodeJS by the way.

I wanted to do that but gave up. I’ll be watching this thread for sure!

1 Like

For realtime status you can use websockets. Maybe check the following topic:

1 Like

Cheers, that did the trick thanks :slight_smile: