adding auth and cleaing up edit events