added empty code check to the OAuthAuthenticator.Authorize func