In case of user exiting the page, the code is saved to sessionStorage and recovered when the page is reloaded