Use the Application.onDisconnect handler (documented on FlashCom help)
The private chat example on this site manage to use unique usernames in Application.onConnect handler, check it
BTW: You are registered since 2 years and always ask like a newbie. Seems that your learning curve is veeeeery slow !
Jorge