<?php
require_once 'includes/functions.php';

if (isLoggedIn()) {
    logActivity($_SESSION['user_id'], 'logout', $_SESSION['user_name'] . ' logged out');
}

session_destroy();
header("Location: " . BASE_URL);
exit;
