If you don’t want to use PHP in your templates and you know the maximum level of segments your content will generate you can just do this:
{exp:member:login_form return="{segment_1}/{segment_2}/{segment_3}"}This will redirect to the current page, which is what you want if you have the login in a sidebar or in the header on each page ..