Fixed json response of do_register