add login function (extra index.php to handle session)