Fix retrieve user and check login.