Fix 401 unauthorized error