Fixed auth error handling