Logging in works on index page