Adding code to handle proxy credentials