Add login check and index.php