Handled the login