In the proof of concept I linked, a self expiring session token is given to the client.
If it is returned before the expiry, a new token is generated and the process starts over.
If it is not returned before its expiry the session is considered to have been closed.