cluster: unify node disconnect code.

also tracks if we need to re-authenticate.