save user object to local storage and retrieve on page reload