Add event delete function
bugfix for logout