added logout and cookies