<?php
session_start();

// Unset all session variables specific to the team
unset($_SESSION['team_id']);
unset($_SESSION['team_user']);
unset($_SESSION['team_role']);

// Completely destroy the session
session_destroy();

// Redirect back to the login screen
header("Location: login.php");
exit();
?>