added base64 encoding of username and password