Add new users to client

Hi, I am on my way of building my client using XIFF 3 and I am stuck in the place… how to add users to a client…?

can someone show ma a sample code for that…?