Correctly encode userdata if running in the browser
Merge pull request #12 from ohnoimdead/userdata-fix

Correctly encode userdata if running in the browser