I know there are a couple modules other there that handle login redirects like Login Destination, LoginToboggan, Login Redirect and Rules. However, they all seem to only allow strict URLs. I would like users to be redirected to the same page they logged in on. The default behaviour of Drupal appears to redirect users to the previous page on login.
Since I am using a login modal, redirecting people to the previous page doesn't work well.
How can I redirect users to their current page when using a login modal that handles the login through AJAX? I would appreciate a solution that could be placed in template.php maybe using hook_user_login()