tweaking auth and index.php to work right