fix the auth method