validate username and password length