I know you can just specify the password with the -password= parameter, but that is not always a viable option if you want to have a 'Join server' link in a public place (like your unit's homepage, for example).
If the server you try to -connect= to has a password, it should prompt for the password with the dialogue box just as though you were selecting it from the server browser. Currently it just treats your 'password input' as nul, and chucks you out for wrong password.