Imagine: user clicks the link which brings him/her to a secure page
(let's call it page "X") which requires login session.
If user is not logged in, he/she is redirected to a login page.
Question: how can I make user get redirected back to that original page
(names "X") which threw him/her to login form?
PS: I tried something like getting url name of page X and redirect to
login with that name variable. After login, it gets redirected back to
the page that sent variable. But it did not always work. Does anyone
know of any bullet-proof solutions, though simple ones.
Thanks