true]); } else { // If navigated directly, redirect to login header('Location: login.html'); exit; }