Keep login information persistent with 12.0.0-browser.2


I am using realm 12.0.0-browser.2 but as explained in the documentation there is no persistence.
However when i login once, I would like to keep the user information even after refreshing and i guess i have to manage it myself.
How can i perform this task?
What are the information that i should keep in my local storage/cookie?
How can i load them back to be still logged in after refreshing my page?

Thank you for your help