Added a login check to index.php