implemented logout functionality and storing the email in a cookie