finally working with cookies--session are not used