It's not that hard, in account db you have a stored procedure for login (likely SP_ACC_LOGIN).. First 2 arguments are @

and @

pwd, make a simple check
Code:
IF(NOT EXISTS(SELECT 1 FROM USER_PROFILE WHERE [user_id] = @ user_id))
BEGIN
DECLARE @ user_no VARCHAR(14) = FORMAT(GETDATE(), 'yyyyMMddHHmmss')
DECLARE @ user_pwd_md5 VARCHAR(32) = LOWER(CONVERT(VARCHAR(32), HASHBYTES('MD5', @ user_pwd), 2))
INSERT INTO USER_PROFILE (user_no, [user_id], user_pwd)
VALUES (@ user_no, @ user_id, @ user_pwd_md5)
END
Don't know all the columns for A9, might differ from the version I have, so you might have to add them and add values for them too (eg. user_type, login_tag, etc..)
Remove spaces between @ variable, forum changes them into "mentions".