check for existing user and return error code num