added parameter check to register route