Improved the authentication process