diff --git a/Controller/SecurityController.php b/Controller/SecurityController.php
index <HASH>..<HASH> 100644
--- a/Controller/SecurityController.php
+++ b/Controller/SecurityController.php
@@ -106,7 +106,7 @@ class SecurityController extends AbstractController
         ;
 
         return $widget
-            ? new AjaxResponse('', true, $successMessage, [], $url)
+            ? new AjaxResponse(null, true, $successMessage, [], $url)
             : $this->redirect($url);
     }
 
@@ -140,7 +140,7 @@ class SecurityController extends AbstractController
         $url = $this->generateUrl($this->container->getParameter('darvin_user.already_logged_in_redirect_route'));
 
         return $widget
-            ? new AjaxResponse('', true, $successMessage, [], $url)
+            ? new AjaxResponse(null, true, $successMessage, [], $url)
             : $this->redirect($url);
     }
Pass null instead of empty string in place of HTML to AJAX response constructor.