Fixed authentication problem and added authentication callback for client class