switch to use tidepool.js and pass host option
also need to check the dependancy is not undefined on the window object