Allows . prefix in cookie domain

Closes #876