Extends JsonResponse and RedirectResponse for OAuth2.