If you were to use the script I distribute you'd find that the script will not let you issue authentication commands on a channel. It has a similar setup to what King Tomato quoted here but goes a bit further.

I always recommend people use status window to issue authentication commands or make dialogues and enter the information there.