check the length of passphrase and SSID at the beginning