cookies and socket integration added