password and port validation