diff --git a/aleksis/core/mixins.py b/aleksis/core/mixins.py
index e1f08e9c29c1116e53e54cded8980aebdb378504..f4ae9a9d0c28f3539b1f4359785db555557c2bbc 100644
--- a/aleksis/core/mixins.py
+++ b/aleksis/core/mixins.py
@@ -6,7 +6,7 @@ from typing import Any, Callable, List, Optional, Union
 
 from django.conf import settings
 from django.contrib import messages
-from django.contrib.auth.views import LoginView, SuccessURLAllowedHostsMixin
+from django.contrib.auth.views import LoginView, RedirectURLMixin
 from django.contrib.contenttypes.models import ContentType
 from django.contrib.sites.managers import CurrentSiteManager
 from django.contrib.sites.models import Site
@@ -465,7 +465,7 @@ class SuccessMessageMixin(ModelFormMixin):
         return super().form_valid(form)
 
 
-class SuccessNextMixin(SuccessURLAllowedHostsMixin):
+class SuccessNextMixin(RedirectURLMixin):
     redirect_field_name = "next"
 
     def get_success_url(self) -> str:
diff --git a/pyproject.toml b/pyproject.toml
index ea5efd732d8efcb32f9c4ff28a71bf6894b873b3..bcb007634df94169cc7c0cd3e267be1ef7145565 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -56,7 +56,7 @@ secondary = true
 
 [tool.poetry.dependencies]
 python = "^3.9"
-Django = "^4.0"
+Django = "^4.1"
 django-any-js = "^1.1"
 django-menu-generator-ng = "^1.2.3"
 django-tables2 = "^2.1"