login function and a dummy index page