Improve handling of login/sign-out on index page