I'm glad you asked, because I think you might have misunderstood entity variables.
Essential variables are the right thing to use for what you are trying to do.
Entity variables in KRL are saved for the user as long as the kobj.net cookie is stored in its browser.

This means that if you use an entity variable to store the username and other data, your application will still have access to this file if this cookie is in the browser.
* FUTURE
In the future, the platform will support a better mechanism for synchronizing these “sessions” across multiple computers and browsers. This will allow the user to restore a “session” with the system if they lose their cookie or go to another computer or browser.
At the same time, because the sky knows when the "Future" will be upon us, you can save the information in an entity variable AND return it to where the StringBin is . Then, in your application, when you check the stored data in an entity variable and there is none, you can also check StringBin to see if there were backups of user data there. If so, you can "restore" the data, and the user continues to use the application, never knowing what you just did.
source share