error_reporting(E_STRICT|E_ALL);
include('functions.php');

print_r($_SESSION);
if(!isset($_SESSION['username'])) {
    header('Location: ./login.php');
    die();
}

Add a code snippet to your website: www.paste.org