fixed firefoxos socket
added base64 encoding from crypto-js