$localStorage and $sessionStorage done right.