improved support of cookies and http status