send_cookie must be global
global send_cookie