Server part of registration partially implemented.