General information about ClientLogin: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
Discussion on Google Groups (including the original solution posted by geoffd123):
http://groups.google.com/group/google-appengine-java/browse_thread/thread/c96d4fff73117e1d
My solution uses Apache Http library instead of HttpUnit.
public static String loginToGoogle(String userid, String password,
...