login and persistence with html5 local storage