<?php
session_start();

unset($_SESSION["superUser"]);

// Get the current page URL from the POST data
$currentPage = isset($_POST["currentPage"]) ? $_POST["currentPage"] : "defaultPage.php";

// Return the redirect URL as a JSON response
echo json_encode(["redirect" => $currentPage]);
?>