Improved KeepAlive with heartbeats and logons