<?php

$text = $languageContent['logout'];

if (!$loggedIn) {
    echo '<script>window.top.location.href = "/"; </script>';

    exit;
}

session_destroy();

$loggedIn = false;

echo '<script>window.top.location.href = "/"; </script>';

exit;