Javascript library for connecting to portal REST API, browser and nodeJS compatible