Added authentication for REST-api.