added local storage for user with fallback to cookies if the client is to old