added authentication to cloud endpoints