I just burned 4 hours of my time trying to figure out why CakePHP wouldn’t write cookies.
Apparently there is a known problem with using $this->Cookie->domain = ‘localhost’ , thanks to Flxr from the IRC for pointing that out.
After making a virtual domain for the site, it worked wonderfuly!