<?php
header('Content-Type: application/json');
define('SECURE_ACCESS', true);
require_once __DIR__ . '/../../includes/config.php';
require_once __DIR__ . '/../../includes/auth.php';

echo json_encode([
    'csrf_token' => getCSRFToken(),
    'is_logged_in' => isLoggedIn(),
    'username' => $_SESSION['username'] ?? null
]);
