5
Here is a link for you which is probably just what you are looking for micaj. I am not sure exactly how it works but check it out. It looks like you can add any url to the value field in the template file as indicated in the linked thread below. ie; value="<{$xoops_url}>/modules/welcome" />
Still it is a preset redirect. How you can make that into a redirect back to the page they actually logged in from I am not sure. But hey-it's a start.
https://xoops.org/modules/newbb/viewtopic.php?topic_id=40358&forum=27&post_id=176802#forumpost176802