added the logout function (removes cookies from the database)