The steps below will allow you to set a referrer in the Memberships > Advanced Settings for your “Message for Logged-out Users:”. This way, when a user clicks to “log in” to view the members-only content, they will be redirected back to that URL after login.
This recipe will redirect members to certain pages based on their membership levels.
Tweak this code to your needs by changing the membership id numbers in the pmpro_hasMembershipLevel() checks and changing the URLs in the home_url() calls. In this case, level #1 users are sent to a page at /level-one/, level #2 users are sent to /level-two/, level #3 etc, and all others are sent to the homepage.