That's hard to say for sure "yup, you need another
String there" because you don't have access to the server-side implementation. Since you said the username/password were provided to you, I'm guessing your code simply doesn't match what the server expects, OR you're getting a return value your code isn't designed to handle.
From the
Java API, that exception is "Thrown to indicate that a method has been passed an illegal or inappropriate argument. "
If this is someone else's server, I would definitely contact them first to ask how authentication works.