added from_user_auth_hash method
changed session management