maintain session data across subdomains in cakephp

One of my bigger project requires me to setup personal sites on the main site’s subdomains. So i did what everyone would do and googled that.
It turned out to be quite simple. You just have to set session.cookie_domain to the domain of your site without www.
Like this session.cookie_domain = .mysite.com
Of course, you can set it with php using
ini_set("session.cookie_domain", ".localhost/mysite");
AND
You probably need to set cakephp security setting to medium or low. You can do that in core.php
Some people say medium is enough, but i needed to change minie to low in order for it to work.