implemented login control across all pages (via index.php)

implemented login control across all pages (via index.php)