Send heartbeat messages from the gui to the server

This changeset adds the sending of heartbeat messages from the gui to the server.