fixed base64 encoding. always remember there are newlines"