Modified isLength, isUsername, and isPassword functions.