/// <summary>
        /// Performs the gateway registration process
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        public void Register(string username, string password)
        {
            RegisterQuery 	query 	= new RegisterQuery();
            IQ 				iq 		= new IQ();

            iq.ID   = XmppIdentifierGenerator.Generate();
            iq.Type = IQType.Set;
            iq.From = this.Session.UserId;
            iq.To   = this.Identifier;

            iq.Items.Add(query);

            query.UserName = username;
            query.Password = password;

            this.PendingMessages.Add(iq.ID);

            this.Session.Send(iq);
        }
        /// <summary>
        /// Performs the gateway unregistration process
        /// </summary>
        public void Unregister()
        {
            RegisterQuery 	query 	= new RegisterQuery();
            IQ 				iq 		= new IQ();

            iq.ID   = XmppIdentifierGenerator.Generate();
            iq.Type = IQType.Set;
            iq.From = this.Session.UserId;
            iq.To   = this.Identifier;

            iq.Items.Add(query);

            query.Remove = "";

            this.PendingMessages.Add(iq.ID);

            this.Session.Send(iq);
        }