If you want to authenticate users using your own login page in place of the Rocket.Chat's login page via the iframe integration, go to Administration > Accounts > Iframe
and enable it:
If you need listen to events, go to Administration > General > Iframe Integration
and enable send (events) or receive (commands), depending on your needs: