Added support for localStorage in the browser