Handle auth requests and heartbeats.