Don't show when hash is #login Redirect to authenticate page when not logged in, navigate to default module (home or books) when logged in. Also, replace invalid hashes - don't just set to a new one and break the back button.