About register and login in updater you need api on php with security checks.
Updater only need send request to api to register or login without connect to db. Connect to db only on serverside, highly recommend use pdo with mysql.
Encode strings with data before send you need do in updater. Serverside with php need decode strings in request and do register, checks have current login or not and other.
How good guy said, you can use share updater only switch design with connects and add new features.