* Added check for authentication results and exit if failed.