Fix blocking on authentication failure.