Fixed another case where we were incorrectly logging out on errors.