refactor user validation. pair: Huan & all