Decoding of base64 in JS is atob(), not btoa().