Encoded authentication data

I ran into trouble when using a password with a & in it. 
Using `xmlEncode` on the authentication data fixes this.