Many thanks @scott, indeed, that is exactly the same request.
However I am affraid the solution does not work for my case as I have pages under different folders and I can not pass under return variable=folder/securepage1.php
Thanks loads @scott for your suggestions, they worked great.
The only part that I am still struggling with is when I have a secured Single Page App (SPA) and I want to be able to forward the user to the right route within the SPA after login.
The challenge is that the login url is set at the SPA level, not at the individual route level, any ideas on how to overcome this?