base64 decode the byte buffer before reading from it.

/cc @puzza007