domain restriction and added unit tests

added domain restriction variable to check list of domains that can add cookies using this domain.  added unit test.