config for gate; add register handler API to gate