Added methods for logging in a user.