I'm using a modal form module to display a modal login window, so far so good, but when I attempt to let it redirect on the current page that the user is displaying it redirect me to a not existing page. For example, when I do login it redirect me to www.mydomain/m instead of www.mydomain/current-page
What I've already tried is to set as a redirect in the login destination module, but it won't work (It redirect me to the the page above). I've tried as well to build a rule that will redirect me to [site:current-page:url], but the result is http://www.mydomain/modal/ajax/login, it seems to bring the link of the page that make the access.
The question is, how I can get the current page during the redirect? Do I need to get the previous page somehow?
Thanks for the help.