bug fixing for authentication.