in case if local storage is not suppoerted, cookie is used