Added registration option
added Registration option and changed server protocol