add cookies for redirect request and add sent messages count to logging