Add cookie support

Add a command line option to support cookie