<?php 

require 'connect.inc.php';
require 'core.inc.php';

if (loggedin()) {
    $name = getuserfield('name');
    echo ' You are logged in '. $name.' <a href="logout.php">Log out</a><br>';
} else {
    include 'login.php';
}
?> 