Using the new authenticate() API instead allows to pass
a user-agent environment along with the credentials.
The main use for the UA environment at this point is
to pass the base URL used to login, so that the server
may initialize its "web.base.url" global config parameters
bzr revid: odo@openerp.com-20111213161554-jbtrp94aatcnibne