Get authmethod slightly earlier, for better debugging.