correctly uses $SETTINGS to set cookie parameters.  again >_>