Move the register part to server