Sorry.
When you login to that server manually, doesn't it give you a message when your login is successful?
For example, when I auth on my network, a bot notices me and I see
[timestamp] -bot- Authentication Successful!
so I use
on *:NOTICE:*Authenticat*:*: join #mychannel
(I wildcarded it like that to also catch the bot's response of "You have already Authenticated yada yada" )
I was assuming your message would come from the server, so you would use
on *:SNOTICE:*response_text_here *:*: join #mychannel
Replace *response_text_here* with the message you get when you login
successfully.
No point trying to join if it didn't work

If SNOTICE doesn't work, try NOTICE.
The ident lag is probably a firewall issue. I'll have to try to find what it was that I did. I know I tried several things before it worked okay.
Re-reading I see you have to wait for a prompt to log in.
So we need to change the
to
on *:SNOTICE:<exact prompt text here>:*: {
I'm trying to make sense, really I am.