Supporting cookies and better session handling