set up auth error handling