Redirect the users to the page they were watching before logging in or registering an account I have a custom login, sign-in and sign-up page in two tabs; I want logged-in users to be redirected to the same page they were watching before logging in or creating an account.

How can I achieve this?
I hope you want to keep users on the currently visited page after logging in or out. If it is so, then download and install the Login Destination module. It is also possible to keep users on the currently visited page after logging in or out.