redirect to homepage if not logged in when on internal pages