Added support for cookies handling.