make setcookie callback before end callback