Added the server parts for the registration part of the protocol.