fix unable to login properly after implementing user_session