Corrected connectWithKerberos method