added base64 encoding/decoding. Thanks Matt!