fix the auth bug