Membership plugin + Homepage for visitors only = Perfect!

I am wanting the homepage to be the only page the user can see until they login.

How can I redirect visitors to a login or register page when they attempt to go somewhere else?

I have tried the member shortcodes but finding out that they only display predefined messages, right?