and how would you do that if the user doesn't actively log out of a service?
specifics depend upon the language and framework used on the server, etc...
specifics depend upon the language and framework used on the server, etc...