added cookie and config reading support