For networks that support SASL (such as PTirc), do the following to configure your ZNC to identify automatically on login, for each network:
/msg *controlpanel SetNetwork Nick $user $network your_nick
/msg *status loadmod sasl (it may already be loaded, especially for PTirc)
/msg *sasl set your_nick nick_password
NOTES
Replace your_nick with your IRC nickname on the network and nick_password with your NickServ password, not your ZNC password (the one you use with /nickserv identify nick_password).
You must respect this rule as best you can if you want to keep the service.
Basically you have to configure SASL and stay on the #ApexBNC channel at all times.