<?php session_start(); require_once "functions.php"; $user = new loginRegistration(); if (!$user->getSession()) { header('Location:index.php'); exit; } $user->logout(); header('Location:index.php');