diff --git a/auth.php b/auth.php
index 7888ca2..8ca9908 100755
--- a/auth.php
+++ b/auth.php
@@ -34,16 +34,21 @@ if ($mysqli->connect_errno) {
exit();
}
$mysqli->set_charset("utf8");
-$auth = NULL;
-$admin = NULL;
-if ($require_authentication || defined('headless')) {
- /* authentication */
- session_name('ulogger');
- session_start();
- $sid = session_id();
- $auth = (isset($_SESSION['auth']) ? $_SESSION['auth'] : "");
- $admin = (isset($_SESSION['admin']) ? $_SESSION['admin'] : "");
+session_name('ulogger');
+session_start();
+$sid = session_id();
+
+// check for forced login to authorize admin in case of public access
+$force_login = (isset($_REQUEST['force_login']) ? $_REQUEST['force_login'] : 0);
+if ($force_login) {
+ $require_authentication = 1;
+}
+
+$auth = (isset($_SESSION['auth']) ? $_SESSION['auth'] : NULL);
+$admin = (isset($_SESSION['admin']) ? $_SESSION['admin'] : NULL);
+if ($auth || $require_authentication || defined('headless')) {
+ /* authentication */
$user = (isset($_REQUEST['user']) ? $_REQUEST['user'] : "");
$pass = (isset($_REQUEST['pass']) ? $_REQUEST['pass'] : "");
$ssl = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off") ? "http" : "https");
@@ -80,6 +85,7 @@ if ($require_authentication || defined('headless')) {
+ '.(($force_login==1) ? "" : "").'