replace btoa with base64.js