added support for using session storage as local storage.