Conditional current cell's user is logged in

I try to build a chat and I want to let any user know if another user is currently logged in or not, via a visual indicator.

For this, I use a repeating group which lists all the users and I add a dot in every cell with the following conditional : “when current cell’s user is logged in —> icon color : green”.

The problem is that whenever the users are logged in or logged out, the dots are always green, so I just want to know if this condition is handled by bubble or if I have to find another way to show this information to users.

I precise that the same conditional is working well when it’s about the current user (“when current user is logged in --> icon color : green”), but it seems not to work for others users.

Being logged in is in the current browser, not in a remote location, so that’s why it won’t work.

That’s a great question, actually.
What would be the best way to make it work?
The two first solutions that come to mind would be to:
a) Add a yes/no field to the user type that gets changed upon login/logout? How to handle browser window close without logging out?
b) Just use a date field to save the time of the last page load and based on the time passed from that display something relevant?

I agree: a) is a good idea, the problem appears indeed when the user closes his browser without logging out, I don’t know if there is a way to solve that.

For b), I’m not sure to understand.

James tried something like this, but found it unreliable …