Return a JSON response when unauthorized.