Saves previous url in session, to be used by navigate (to previous) function