moved cookie lifetime to configuration, added missing test