Added support for setting the userAgent