Show alert instead of 500 error on failed authentication