add configuration for cookie, improve Future