Fixed issues on Authentication.