fix the session and login