refactor how naming works 

move name generation into the client and add a function to listen for 'rename' events. Rename events are expected to have a 'name' attribute.