isLoggedIn()) { header('Location: /login.php'); exit; } if ($auth->isAdmin()) { header('Location: /admin/index.php'); } else { header('Location: /ayudante.php'); } exit;