if (!isLoggedIn()) { header('Location: login.php'); exit(); }