Added Javascript code to do Base64 encoding/decoding and create a Basic authorization header.