Fixed bug within SessionSettings.

Generated cookies weren't setting the domain correctly.
Tests from 1.x were ported