Adding support for the Token and fixing NullReference issue with User-Agent