add authentication for edit