Store the path in the session storage.
This is used to redirect the user to the correct page after login.
The path must be a local path, otherwise it is not stored.
Store the path in the session storage.