Resign first responder before authenticating

While authenticating, the keyboard should be dismissed.