below code converts a host name like "api.blah.com" to ".blah.com"
This is then used in the session domain field to allow subdomains as I\'m using