Modify the register user api to check users api