The first example encapsulates all of the parameters into the <case> tag itself, while the second has the <case> and the closing </case> with the parameters between them.
If you can talk to the developers they might be able to come up with another login method. A straight GET or POST to a URL is the best way to handle this.
Selenium is pretty fantastic. Like webinject it takes a bit to get used to it, but once done it's hard to beat. Let us know if you have questions!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.