add cookies and login logout feature