added authentication for write operartions