diff --git a/scripts/phpmynetconf.php b/scripts/phpmynetconf.php
index 28ab008..0456298 100644
--- a/scripts/phpmynetconf.php
+++ b/scripts/phpmynetconf.php
@@ -62,6 +62,64 @@
 	const MSG_GENERIC	= 15;
 };
 
+function unwrap_rfc6242($message)
+{
+	$response = "";
+	if ($message == "") {
+		return $response;
+	}
+	$chunks = explode("\n#", $message);
+	$numchunks = sizeof($chunks);
+	$i = 0;
+	if ($numchunks > 0) {
+		do {
+			if ($i == 0 && $chunks[$i++] != "") {
+				/* something is wrong, message should start by '\n#'
+				 */
+				echo "Wrong message format, it is not according to RFC6242 (starting with \\n#).";
+				echo var_export($message, true);
+				throw new \ErrorException("Wrong message format, it is not according to RFC6242 (starting with \\n#).");
+			}
+			if ($i >= $numchunks) {
+				echo "Malformed message (RFC6242) - Bad amount of parts.";
+				echo var_export($message, true);
+				/* echo "chunk length<br>\n"; */
+				throw new \ErrorException("Malformed message (RFC6242) - Bad amount of parts.");
+			}
+			$len = 0;
+			sscanf($chunks[$i], "%i", $len);
+
+			/* echo "chunk data<br>\n"; */
+			$nl = strpos($chunks[$i], "\n");
+			if ($nl === false) {
+				echo "Malformed message (RFC6242) - There is no \\n after chunk-data size.";
+				echo var_export($message, true);
+				throw new \ErrorException("Malformed message (RFC6242) - There is no \\n after chunk-data size.");
+			}
+			$data = substr($chunks[$i], $nl + 1);
+			$realsize = strlen($data);
+			if ($realsize != $len) {
+				echo "Chunk $i has the length $realsize instead of $len.";
+				echo var_export($message, true);
+				throw new \ErrorException("Chunk $i has the length $realsize instead of $len.");
+			}
+			$response .= $data;
+			$i++;
+			if ($chunks[$i][0] == '#') {
+				/* ending part */
+				break;
+			}
+		} while ($i<$numchunks);
+	}
+
+	return $response;
+}
+
+function write2socket(&$sock, $message)
+{
+	$final_message = sprintf("\n#%d\n%s\n##\n", strlen($message), $message);
+	fwrite($sock, $final_message);
+}
 /**
   \brief Read response from socket
   \param[in,out] $sock socket descriptor
@@ -80,7 +138,12 @@
 			break;
 		}
 	} while ($tmp != "");
-	return trim($response);
+	try {
+		return unwrap_rfc6242($response);
+	} catch (\Exception $e) {
+		echo $e;
+		return "";
+	}
 }
 
 function printJsonError() {
@@ -124,17 +187,19 @@
 */
 function handle_connect(&$sock)
 {
+	$capabilities = explode("\n", trim(str_replace("\r", "", $_REQUEST["capab"])));
 	$connect = json_encode(array("type" => MsgType::MSG_CONNECT,
 	"host" => $_REQUEST["host"],
 	"port" => 22,
 	"user" => $_REQUEST["user"],
-	"pass" => $_REQUEST["pass"]
+	"pass" => $_REQUEST["pass"],
+	"capabilities" => $capabilities,
 	));
-	fwrite($sock, $connect);
+	write2socket($sock, $connect);
 	$response = readnetconf($sock);
 	$decoded = json_decode($response, true);
 	echo "<h2>CONNECT</h2>";
-	if ($decoded["type"] == MsgType::REPLY_OK) {
+	if ($decoded && ($decoded["type"] == MsgType::REPLY_OK)) {
 		$sessionkey = $decoded["session"];
 		if (!isset($_SESSION["keys"])) {
 			$_SESSION["keys"] = array("$sessionkey");
@@ -149,8 +214,8 @@
 		echo "Successfully connected.";
 		return 0;
 	} else {
-		echo "Could not connect.";
-		var_dump($decoded);
+		echo "Could not connect.<br>";
+		echo "Result: ". var_export($decoded, true);
 		return 1;
 	}
 }
@@ -183,7 +248,7 @@
 function execute_operation(&$sock, $params)
 {
 	$operation = json_encode($params);
-	fwrite($sock, $operation);
+	write2socket($sock, $operation);
 	$response = readnetconf($sock);
 	return json_decode($response, true);
 }
@@ -207,7 +272,7 @@
 	}
 	$decoded = execute_operation($sock, $params);
 
-	echo "<h2>GET-CONFIG</h2>";
+	echo "<h2>GET</h2>";
 	printxml($decoded["data"]);
 }
 
@@ -353,6 +418,7 @@
 
 
 /* print mainpage */
+echo "<html><head><title>phpMyNetconf</title><body>";
 if (!isset($_REQUEST["command"])) {
 	echo "<h2>Connect to new NETCONF server</h2>
 	<form action='?' method='POST'>
@@ -360,9 +426,20 @@
 	<label for='host'>Hostname:</label><input type='text' name='host'><br>
 	<label for='user'>Username:</label><input type='text' name='user'><br>
 	<label for='pass'>Password:</label><input type='password' name='pass'><br>
+	<label for='capab'>Capabilities:</label><br><textarea name='capab' rows=10 cols=100>
+urn:ietf:params:netconf:base:1.0
+urn:ietf:params:netconf:base:1.1
+urn:ietf:params:netconf:capability:startup:1.0
+urn:ietf:params:netconf:capability:writable-running:1.0
+urn:ietf:params:netconf:capability:candidate:1.0
+urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&amp;also-supported=report-all,report-all-tagged,trim,explicit
+urn:cesnet:tmc:comet:1.0
+urn:cesnet:tmc:combo:1.0
+urn:cesnet:tmc:hanicprobe:1.0
+</textarea><br>
 	<input type='submit' value='Login'>
 	</form>";
-	if (isset($_SESSION["keys"])) {
+	if (isset($_SESSION["keys"]) && sizeof($_SESSION["keys"])) {
 		echo "<h2>Already connected nodes</h2>";
 		$keys = $_SESSION["keys"];
 		$i = 0;
@@ -427,7 +504,6 @@
 		printf("Not implemented yet. (%s)", $_REQUEST["command"]);
 	}
 	fclose($sock);
-	exit(0);
 }
-
+echo "</body></html>";
 
