finish the register service