<?php
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}

// If the user is logged in, redirect to the dashboard.
if (isset($_SESSION['user_id'])) {
    header("Location: dashboard.php");
    exit();
} else {
    // If the user is not logged in, redirect to the home page (ADA checker page).
    header("Location: home.php");
    exit();
}

// No HTML content is needed here as it always redirects.
?>
