check whether the register of user is legal