Add a couple wrapper functions for base64 encoding client side to start fixing #338