I am attempting to convert code from a swift SDK to a web SDK. Is there an equivalent in Javascript to Swift's UserDefaults class? Would localStorage or sessionStorage be a good option? And if so, which would be better suited for storing user data?