Change return type in controller to JsonResponse