add register endpoint