exit correctly on failed authentication