base64 encode session data and return a string