clean up index.php: cookie check, login handling, session code