adds base64 decoding (fixes #5656)

fixes #5656
Likewise here; we have to encode to decode? (I don't know anything really about Base64, so I could easily be misunderstanding.)