Fixed authorization bug

Fixed the authorization bug