diff --git a/js/headfoot.js b/js/headfoot.js
index 4e5eaf50e6e5a1636d809b41b85383a4f1f1ea73..81a71cfa77e5cd37bdf2b513f354433933e5f4c4 100755
--- a/js/headfoot.js
+++ b/js/headfoot.js
@@ -111,7 +111,7 @@ function head(){
             for(let k = 0; k< menu[j].combos.length; k++){
                 let combolink = document.createElement('a');
                 combolink.classList.add("dropdown-item");
-                if(userAuthenticated() || user){ //either logged in the old way or logged in using SAML
+                if(userAuthenticated() || typeof user !== 'undefined'){ //either logged in the old way or logged in using SAML
                     if(menu[j].combos[k].link.includes('?')){
                         combolink.href = menu[j].combos[k].link + "&isAuthenticatedUser=true";
                     }else{    
@@ -129,7 +129,7 @@ function head(){
                 headlink.innerHTML="Account";
                 headlink.href="/account/";
             }
-            if(user){ //user has priority
+            if(typeof user !== 'undefined'){ //user has priority
                 headlink.innerHTML="Logout";
                 headlink.href="/account/logout";
             }