fix the authentication bug