<?php
require __DIR__ . '/includes/panel_auth.php';

if (isset($_GET['logout'])) {
    panelLogout();
    header('Location: login.php');
    exit;
}

if (panelIsLoggedIn()) {
    header('Location: settings.php');
} else {
    header('Location: login.php');
}
exit;
