modified BTrust.js to work with local webserver