Changes to database and fix to deleting cookie.