diff --git a/modules/core/templates/loginuserpass.twig b/modules/core/templates/loginuserpass.twig
index 43344580ec3c9e1253fb9cbe55abeda90676d316..5471f5f12c22ced168042c53511d30238197208a 100644
--- a/modules/core/templates/loginuserpass.twig
+++ b/modules/core/templates/loginuserpass.twig
@@ -3,7 +3,7 @@
 {% extends "@core/base.twig" %}
 
 {% block postload %}
-    <script src="/{{baseurlpath}}module.php/core/assets/js/loginuserpass.js"></script>
+    <script src="{{ asset('js/loginuserpass.js', 'core') }}"></script>
 {% endblock %}
 
 {% block content %}