register endpoint now returns json on success/fail