use localStorage instead of cookies

Change-Id: Id57b9586252dd932bd415e76e35de6895114dfbd