Redirect user back to content after Login and/or registration

I have created a “No Access Message” that has 2 links to either login or register “to see exclusive content”. But I would like to have the message redirect the user back to the current page after logging in/registering (using a register page built into Membership). The “no access message” area doesn’t support php. I was simply going to append the $_SERVER[“REQUEST_URI”] to each of my login and register links.

Any ideas for a best solution would be greatly appreciated. Maybe through a filter on the no access message or something similar?