added authentication for delete and edit