Device & User where is that link stored?

Hi all, I have a requirement to be able to log off all users from their devices every night. I posted a question a while ago if anyone could think of a way to do this, but it never got very far.

It suddenly occurred to me the other day that if I could find where the data regarding which user is logged in to which device is stored, potentially i could just remove that “link” every night.

Does anyone know what happens when a user logs in to a device? Where is that data stored ?

Thanks

Rob