<?php
session_start();

// Include required files
require_once 'includes/functions.php';

// Destroy session
session_destroy();

// Clear session cookie
if (isset($_COOKIE[session_name()])) {
    setcookie(session_name(), '', time()-3600, '/');
}

// Redirect to login page
header("Location: login.php");
exit;
?>