Make service a local variable to authenticate function