Bug fix in logging unsuccessful authentication