fix saving cookie to session do not work