Hi,
I know a very clean chat solution to your problem that is a freeware and has all the relevant function described by you. Installing it is literally 5 minutes (adding javascript to website, for an example in header).
This chat is available free of charge and according to authors will remain as such in future. They do make their income of actually providing agents for self written chat.
It has multiple accounts, inter-agent chat, admin and user divisions and may support many websites at once.
If you would like me to point you to this and help with installation, configuration and user managment, please let me know. I will gladly do so!
Perhaps it is the quickest, cleanest and easiest solution?
Kind regards,
Jakub Wojciechowski