changed method for auth and xml parsing