[ms-membership-login] redirect to current page.

I am creating a membership site using Membership Pro 2. I have protected a part of the post using the shortcode. When a guest user visits that post, he is required to log in to view the full post. But when the user logins, he is directed to accounts page. I want that after login, the user should stay on the same page that he was reading

When the user logs out, the functionality is ok. The user stays on the same page.