Changed to sessionStorage instead of cookie