adding headers and cookies