changed connection code to work with Smack alpha6 API