switch from cookies to sessionStorage