added base64 encoding / decoding functions