Minor fixes to the authenticate method.