Added method to pass cookies on conenct