add function of checking username on server side