diff --git a/server/http.go b/server/http.go
index c5e1fb053611fa049ebd708f792125f34ba83a5c..6e6a082e217824f912a83952e6d714e9278b606d 100644
--- a/server/http.go
+++ b/server/http.go
@@ -144,8 +144,8 @@ func New(loginService *LoginService, authClient authclient.Client, config *Confi
 	// handler, optional CSRF protection, custom HTTP headers,
 	// etc.
 	mainh := http.NewServeMux()
-	mainh.HandleFunc("/logout", h.handleLogout)
-	mainh.HandleFunc("/", h.handleGrantTicket)
+	mainh.HandleFunc(h.urlFor("/logout"), h.handleLogout)
+	mainh.HandleFunc(h.urlFor("/"), h.handleGrantTicket)
 
 	loginh := login.New(mainh, devMgr, authClient,
 		config.AuthService, config.U2FAppID, urlPrefix,