modified Checkvalid User to use boolean