reimplement heartbeat scheme and make heartbeater handle client re-registeration