use local storage instead of cookies