Added method for logging in