Membership Redirect to URL after login

Is there any way to redirect users back to the URL they arrived at after login in a Membership powered website?

I have summary emails sent to users from BBPress with links to log in and view topics. When users try to use those links they are asked to log in and sent to the default home page.

I'd like to change that to redirect them to the post link they originally clicked on.

If anyone has a suggestion on how to achieve this I'd be very grateful.

Thank you!