diff --git a/inc/auth.php b/inc/auth.php
index 905cc14bfb07458b8a1fb99e73a07c6f324e5aa5..99adfa791f1eb1966a7b96f42dfc21104a407449 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -65,7 +65,7 @@ function auth_setup() {
         nice_die($lang['authmodfailed']);
     }
 
-    if(!$auth) return false;
+    if(!isset($auth) || !$auth) return false;
 
     // do the login either by cookie or provided credentials XXX
     $INPUT->set('http_credentials', false);