Hi Winanjaya.
You can use "query" service for this purpose.
In "where" clause you can use following:
precode
{"userid": "hereIsYourUserIdYouWantToTest"}
/code/pre
Then you need invoke this service before start add user into DB.
Also you need to add "Success" event handler to these datasource with following JS:
precode
var isUserExists = data.length > 0;
if(isUserExists)
alert("userExistsInDB")
else
alert("userNotExistsInDB");
/code/pre
Note: you should replace these alerts with code you need in accordance to your app logic.
Regards.