diff --git a/templates/login.html b/templates/login.html
index 1f0e338..c75aa39 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -85,7 +85,7 @@
         if (nextURL) {
             window.location.href = nextURL;
         } else {
-            window.location.href = '/wireguard/';
+            window.location.href = '/{{.basePath}}';
         } 
     }