<?php
// home.php - Public home page or redirect
require_once __DIR__ . '/src/Auth.php';

$auth = new Auth();

// If user is logged in, redirect to dashboard
if ($auth->isLoggedIn()) {
    header('Location: /dashboard.php');
    exit;
}

// Otherwise redirect to login
header('Location: /login.php');
exit;
