Authoritative Server help

How do you do simple commands to clients from a server?

I have a simple chat room set up and I’d like for my player to send his name to the server and the server sends the name to the chat room. I have logging in and the server setup already but I feel it’s very unorganized. What’s an easy way to implement this?

Basiclly if the chat room is public only then you can have a chat room manger script attached to a networkview.
Then have RPCs like
OnMessageReceived(string msg,string userName)
Login(string userName,string passwordHash)

On client and similar stuff on server to get Messages from a user and send it to all others.

Just use standard code organization techniques.