diff --git a/chatdialog.cpp b/chatdialog.cpp
index ca1b3ae..34f5682 100644
--- a/chatdialog.cpp
+++ b/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/chatdialog.h b/chatdialog.h
index e30c05e..337f20f 100644
--- a/chatdialog.h
+++ b/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/main.cpp b/main.cpp
index 8f24743..6b73923 100644
--- a/main.cpp
+++ b/main.cpp
@@ -7,5 +7,6 @@
   
   ChatDialog dialog;
   dialog.show();
+  dialog.activateWindow();
   return app.exec();
 }
diff --git a/settingdialog.cpp b/settingdialog.cpp
index 8719a84..be0bb42 100644
--- a/settingdialog.cpp
+++ b/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/settingdialog.h b/settingdialog.h
index 5487cde..ac63777 100644
--- a/settingdialog.h
+++ b/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/settingdialog.ui b/settingdialog.ui
index dff4408..b848aa9 100644
--- a/settingdialog.ui
+++ b/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>
