edit:
Basically, I just want to know how an experienced person would check if the a user is already looged in, before logging them in on another device..
Im making an app version of a physical board game. Im trying to choose the best way to manage who is online etc. I am not using the app42 User Service. I was, but have decided to just use the Storage Service for the users, with a "status" property in each users json doc, which is set to either "online" or "offline". When logging in, the app needs to check if that user is already online (we cant have two devices logged in to the same user). So Im considering adding a "lastActionTime" property to each users json doc, which is the time when they last accessed the DB. And while the user is active in the app, even if they are not using the database, they will still update their "lastActionTime" property at regluar intervals. And When checking if a user is already online, It will also check if the "lastActionTime" was soon enough, and if not it will consider that user logged out.
Am I on the right track here?