Changed to httpclient, checks for valid cookies.