diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index ca1b3ae..34f5682 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -3,23 +3,17 @@
 #include "settingdialog.h"
 #include <ctime>
 #include <iostream>
+#include <QTimer>
 
 ChatDialog::ChatDialog(QWidget *parent)
   : QDialog(parent)
 {
   setupUi(this);
+
+  readSettings();
+  updateLabels();
+
   lineEdit->setFocusPolicy(Qt::StrongFocus);
-
-  // for test only
-  m_nick = "Tester";
-  m_chatroom = "Test";
-  m_prefix = "/ndn/ucla.edu/cs/tester";
-
-  QString settingDisp = QString("<User: %1>, <Chatroom: %2>").arg(m_nick).arg(m_chatroom);
-  infoLabel->setText(settingDisp);
-  QString prefixDisp = QString("<Prefix: %1>").arg(m_prefix);
-  prefixLabel->setText(prefixDisp);
-
   DigestTreeScene *scene = new DigestTreeScene();
 
   treeViewer->setScene(scene);
@@ -66,6 +60,36 @@
   msg.set_timestamp(seconds);
 }
 
+void
+ChatDialog::readSettings()
+{
+  QSettings s(ORGANIZATION, APPLICATION);
+  m_nick = s.value("nick", "").toString();
+  m_chatroom = s.value("chatroom", "").toString();
+  m_prefix = s.value("prefix", "").toString();
+  if (m_nick == "" || m_chatroom == "" || m_prefix == "") {
+    QTimer::singleShot(500, this, SLOT(buttonPressed()));
+  }
+}
+
+void 
+ChatDialog::writeSettings()
+{
+  QSettings s(ORGANIZATION, APPLICATION);
+  s.setValue("nick", m_nick);
+  s.setValue("chatroom", m_chatroom);
+  s.setValue("prefix", m_prefix);
+}
+
+void
+ChatDialog::updateLabels()
+{
+  QString settingDisp = QString("<User: %1>, <Chatroom: %2>").arg(m_nick).arg(m_chatroom);
+  infoLabel->setText(settingDisp);
+  QString prefixDisp = QString("<Prefix: %1>").arg(m_prefix);
+  prefixLabel->setText(prefixDisp);
+}
+
 void 
 ChatDialog::returnPressed()
 {
@@ -88,7 +112,30 @@
 ChatDialog::buttonPressed()
 {
   SettingDialog dialog(this, m_nick, m_chatroom, m_prefix);
+  connect(&dialog, SIGNAL(updated(QString, QString, QString)), this, SLOT(settingUpdated(QString, QString, QString)));
   dialog.exec();
-  setButton->setFocusPolicy(Qt::NoFocus);
 }
 
+void
+ChatDialog::settingUpdated(QString nick, QString chatroom, QString prefix)
+{
+  bool needWrite = false;
+  if (!nick.isEmpty() && nick != m_nick) {
+    m_nick = nick;
+    needWrite = true;
+  }
+  if (!prefix.isEmpty() && prefix != m_prefix) {
+    m_prefix = prefix;
+    needWrite = true;
+    // TODO: set the previous prefix as left?
+  }
+  if (!chatroom.isEmpty() && chatroom != m_chatroom) {
+    m_chatroom = chatroom;
+    needWrite = true;
+    // TODO: perhaps need to do a lot. e.g. use a new SyncAppSokcet
+  }
+  if (needWrite) {
+    writeSettings();
+    updateLabels();
+  }
+}
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index e30c05e..337f20f 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -9,6 +9,9 @@
 #include <sync-logic.h>
 #include <sync-seq-no.h>
 
+#define ORGANIZATION "IRL@UCLA"
+#define APPLICATION "SYNC-DEMO"
+
 class ChatDialog : public QDialog,  private Ui::ChatDialog 
 {
 	Q_OBJECT
@@ -20,10 +23,14 @@
 
 private:
   void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
+  void readSettings();
+  void writeSettings();
+  void updateLabels();
 
 private slots:
   void returnPressed();
   void buttonPressed();
+  void settingUpdated(QString, QString, QString);
 
 private:
   QString m_nick;
diff --git a/demo/main.cpp b/demo/main.cpp
index 8f24743..6b73923 100644
--- a/demo/main.cpp
+++ b/demo/main.cpp
@@ -7,5 +7,6 @@
   
   ChatDialog dialog;
   dialog.show();
+  dialog.activateWindow();
   return app.exec();
 }
diff --git a/demo/settingdialog.cpp b/demo/settingdialog.cpp
index 8719a84..be0bb42 100644
--- a/demo/settingdialog.cpp
+++ b/demo/settingdialog.cpp
@@ -8,5 +8,12 @@
   roomEdit->setPlaceholderText(chatroom);
   prefixEdit->setPlaceholderText(prefix);
   connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
-  connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
+  connect(okButton, SIGNAL(clicked()), this, SLOT(update()));
+}
+
+void
+SettingDialog::update() 
+{
+  emit updated(nickEdit->text(), roomEdit->text(), prefixEdit->text()); 
+  accept();
 }
diff --git a/demo/settingdialog.h b/demo/settingdialog.h
index 5487cde..ac63777 100644
--- a/demo/settingdialog.h
+++ b/demo/settingdialog.h
@@ -8,6 +8,13 @@
 
 public:
   SettingDialog(QWidget *parent = 0, QString nick = QString("NULL"), QString chatroom = QString("NULL"), QString prefix = QString("NULL"));
+
+private slots:
+  void update();
+  
+signals:
+  void updated(QString, QString, QString);
+
 };
 
 #endif
diff --git a/demo/settingdialog.ui b/demo/settingdialog.ui
index dff4408..b848aa9 100644
--- a/demo/settingdialog.ui
+++ b/demo/settingdialog.ui
@@ -59,13 +59,25 @@
                 <number>6</number>
               </property>
               <item>
-                <widget class="QLineEdit" name="nickEdit" />
+                <widget class="QLineEdit" name="nickEdit">
+                  <property name="maxLength">
+                    <number>200</number>
+                  </property>
+                </widget>
               </item>
               <item>
-                <widget class="QLineEdit" name="roomEdit" />
+                <widget class="QLineEdit" name="roomEdit">
+                  <property name="maxLength">
+                    <number>200</number>
+                  </property>
+                </widget>
               </item>
               <item>
-                <widget class="QLineEdit" name="prefixEdit" />
+                <widget class="QLineEdit" name="prefixEdit">
+                  <property name="maxLength">
+                    <number>200</number>
+                  </property>
+                </widget>
               </item>
             </layout>
           </item>
