use npm-user-validate

use npm-user-validate like in the npm-client, to remove the duplicated code across the repositories.