 		 * </tbody>
 		 * </table>
 		 *
+		 * <p>The XMPP RFCs define an ordering for the features defined therein, namely:</p>
+		 * <ol>
+		 * <li>TLS, requires the use of <code>XMPPTLSConnection</code></li>
+		 * <li>In-band registration, if registration needed</li>
+		 * <li>SASL</li>
+		 * <li>Stream compression, if used</li>
+		 * <li>Resource binding</li>
+		 * </ol>
+		 *
 		 * @param	node
-		 *
 		 * @see http://xmpp.org/registrar/stream-features.html
+		 * @see http://xmpp.org/extensions/xep-0170.html
 		 */
 		protected function handleStreamFeatures( node:XML ):void
 		{
-			if ( !loggedIn )
-			{
-				for each ( var feature:XML in node.children() )
+			for each ( var feature:XML in node.children() )
+			{
+				var localName:String = feature.localName();
+
+				switch (localName)
 				{
-					var localName:String = feature.localName();
-
-					switch (localName)
-					{
-						case "amp":
-							break;
-						case "compression":
-							// zlib is the most common and the one which is required to be implemented.
-							if ( _compress )
-							{
-								configureStreamCompression();
-							}
-							break;
-						case "auth":
-							break;
-						case "register":
-							break;
-						case "bind":
-							break;
-						case "mechanisms":
+					case "starttls":
+						handleStreamTLS( feature ); // Checks for 'required'
+						break;
+					case "register":
+						// In Band Registration, if enabled.... TODO
+						break;
+					case "mechanisms":
+						if ( !loggedIn )
+						{
 							configureAuthMechanisms( feature );
-							break;
-						case "session":
-							break;
-						case "starttls":
-							handleStreamTLS( feature );
-							break;
-						case "sm":
-							break;
-					}
+							beginAuthentication();
+						}
+						break;
+					case "compression":
+						if ( (_compress && !compressionNegotiated) && loggedIn )
+						{
+							configureStreamCompression();
+						}
+						break;
+					case "bind":
+						// compression needed, done? else auth done?
+						if ( ((_compress && compressionNegotiated) || !_compress) && loggedIn )
+						{
+							bindConnection();
+						}
+						break;
+					case "amp":
+						// Advanced Message Processing. Coming in XIFF 3.2.0
+						break;
+					case "auth":
+						// Non-SASL Authentication. Not supported
+						break;
+					case "session":
+						// Session Establishment. Done after successful bind
+						break;
+					case "sm":
+						// Stream Management. Not supported
+						break;
 				}
-
-				if ( authenticationReady )
-				{
-					// TODO: Why is the username required here but it is not used at the backend?
-					if ( useAnonymousLogin || ( username != null && username.length > 0 ) )
-					{
-						beginAuthentication();
-					}
-					else
-					{
-						// How to inform the user of the need for in-band registration?
-					}
-				}
-			}
-			else
-			{
-				bindConnection();
 			}
 		}
 

		protected var openingStreamTag:String;

		/**
		 * @private
		 * Depending of the STREAM_TYPE_* used in the <code>connect()</code> method,
		 * this variable will contain a matching closing element for it.
		 * <code>parseDataReceived()</code> method will use this value.

		}

		/**
		 * The port to use when connecting.
		 * @default 5222
		 */
		public function get port():uint
		{
