<?php
require_once 'config/auth.php';

session_start();
if (isset($_SESSION['name'])) {
    echo json_encode(['message' => 'Authorized', 'user' =>   $_SESSION['name'] , 'allowRegistration' => $AllowUserRegistration]);
} else {
    http_response_code(401);
    echo json_encode(['message' => 'Unauthorized', 'allowRegistration' => $AllowUserRegistration]);
}
