added functions for making http requests and b64 encoding