Using window.sessionStorage instead of cookies