diff --git a/frontends/etiquette_flask/static/js/common.js b/frontends/etiquette_flask/static/js/common.js
index 3dbaf83..d9394b9 100644
--- a/frontends/etiquette_flask/static/js/common.js
+++ b/frontends/etiquette_flask/static/js/common.js
@@ -34,6 +34,12 @@ function is_wide_mode()
return getComputedStyle(document.documentElement).getPropertyValue("--wide").trim() === "1";
}
+common.go_to_root =
+function go_to_root()
+{
+ window.location.href = "/";
+}
+
common.refresh =
function refresh()
{
diff --git a/frontends/etiquette_flask/templates/header.html b/frontends/etiquette_flask/templates/header.html
index 2490ed5..b8ca98c 100644
--- a/frontends/etiquette_flask/templates/header.html
+++ b/frontends/etiquette_flask/templates/header.html
@@ -5,7 +5,7 @@
{% if session.user %}
-
+
{% else %}
{% endif %}
diff --git a/frontends/etiquette_flask/templates/login.html b/frontends/etiquette_flask/templates/login.html
index f5c4697..aba1800 100644
--- a/frontends/etiquette_flask/templates/login.html
+++ b/frontends/etiquette_flask/templates/login.html
@@ -141,7 +141,7 @@ function login_register_callback(response)
}
else
{
- window.location.href = "/";
+ common.go_to_root();
}
}