Switch from cookie to local storage