added register endpoint