<?php require_once 'php/InitFiles/Init.php'; $user = new UserSession(); if ($user->getIsLoggedIn()) { ?> <p>Hello <a href="#"><?php echo $user->getUserRegisterInfo()->firstname; ?> </a>!</p> <ul> <li><a href="logout.php">Log out</a></li> </ul> <?php } else { echo '<p>You need to <a href="login.php">log in</a> or <a href="register.php">register</a></p>'; }