trim cookie lifetime value to prevent spaces in URL