diff --git a/package.json b/package.json
index 593c21fc8d6c283d7ae29a448d9609b7975dae9f..a7efebb4abb73da1e80c42a1b0f5947f88ba20f6 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,6 @@
     "vite": "^2.7.2"
   },
   "dependencies": {
-    "hydrogen-view-sdk": "^0.0.7"
+    "hydrogen-view-sdk": "^0.0.8"
   }
 }
diff --git a/public/config.json b/public/config.json
index c6e0925f58f00099ca2d2adbd2758b250f429030..6bf7142ecbc58c5c71751a8ed0943c803dc04303 100644
--- a/public/config.json
+++ b/public/config.json
@@ -6,5 +6,6 @@
         "title": "Chatterbox Test Room",
         "avatar": "https://i.picsum.photos/id/907/200/200.jpg?hmac=SdeLZNONJ3CX-OB15hSXsCheWDC6yYac5N5VUJM7FIQ"
     },
-    "token": "k9SL1R~GcdbjiFjC"
+    "token": "k9SL1R~GcdbjiFjC",
+    "invite_user": "@midhun:matrix.midhun.dev"
 }
diff --git a/src/types/IChatterboxConfig.ts b/src/types/IChatterboxConfig.ts
index 789fcc58cdd0676a79d56539a13e3f5c8bcb3caa..8e0720216f1b0618386a9f49f3d779b90f7a2b38 100644
--- a/src/types/IChatterboxConfig.ts
+++ b/src/types/IChatterboxConfig.ts
@@ -1,9 +1,12 @@
 export interface IChatterboxConfig {
 	homeserver: string;
-    // internal room-id of the room to which chatterbox should join
+    // Internal room-id of the room to which chatterbox should join
 	auto_join_room: string;
-    // string that is to be prepended to the generated random usernames
+    // String that is to be prepended to the generated random usernames
     username_prefix: string;
+    // If specified, chatterbox will create a dm with this user
+    // This option takes precedence over 'auto_join_room'
+    invite_user: string;
     // Configurations for header on chatterbox (containing title, avatar, minimize button)
     header: IHeader;
     // Token needed for token-authenticated registration
diff --git a/src/viewmodels/ChatterboxViewModel.ts b/src/viewmodels/ChatterboxViewModel.ts
index afb36fea89d57864954dda75d612548503677b5c..55caf2053df667bc08f20bb06586456debedde37 100644
--- a/src/viewmodels/ChatterboxViewModel.ts
+++ b/src/viewmodels/ChatterboxViewModel.ts
@@ -1,7 +1,6 @@
-import { RoomViewModel, ViewModel, ComposerViewModel} from "hydrogen-view-sdk";
+import { RoomViewModel, ViewModel, RoomStatus} from "hydrogen-view-sdk";
 
 export class ChatterboxViewModel extends ViewModel {
-    private _messageComposerViewModel?: typeof ComposerViewModel;
     private _roomViewModel?: typeof RoomViewModel;
     private _loginPromise: Promise<void>;
 
@@ -11,11 +10,18 @@ export class ChatterboxViewModel extends ViewModel {
         this._loginPromise = options.loginPromise;
     }
 
-    async loadRoom() {
+    async load() {
         // wait until login is completed
         await this._loginPromise;
-        const roomId = this._options.config["auto_join_room"];
-        const room = this._session.rooms.get(roomId) ?? await this._joinRoom(roomId);
+        let room;
+        if (this._options.config["invite_user"]) {
+            room = await this.createRoomWithUserSpecifiedInConfig();
+        } else if(this._options.config["auto_join_room"]) {
+            room = await this.joinRoomSpecifiedInConfig();
+        }
+        else {
+            throw new Error("ConfigError: You must either specify 'invite_user' or 'auto_join_room'");
+        }
         this._roomViewModel = new RoomViewModel({
             room,
             ownUserId: this._session.userId,
@@ -24,16 +30,44 @@ export class ChatterboxViewModel extends ViewModel {
             navigation: this.navigation,
         });
         await this._roomViewModel.load();
-        this._messageComposerViewModel = new ComposerViewModel(this._roomViewModel);
-        this.emitChange("timelineViewModel");
+        this.emitChange("roomViewModel");
     }
 
-    private async _joinRoom(roomId: string): Promise<any> {
-        await this._session.joinRoom(roomId);
-        // even though we've joined the room, we need to wait till the next sync to get the room
-        await this._waitForRoomFromSync(roomId);
-        return this._session.rooms.get(roomId);
+    private async createRoomWithUserSpecifiedInConfig() {
+        const userId = this._options.config["invite_user"];
+        let room = this._session.findDirectMessageForUserId(userId);
+        if (room) {
+            // we already have a DM with this user
+            return room;
+        }
+        const roomBeingCreated = this._session.createRoom({
+            type: 1, //todo: use enum from hydrogen-sdk here
+            name: undefined,
+            topic: undefined,
+            isEncrypted: false,
+            isFederationDisabled: false,
+            alias: undefined,
+            avatar: undefined,
+            invites: [userId],
+        });
+        const roomStatusObservable = await this._session.observeRoomStatus(roomBeingCreated.id);
+        await roomStatusObservable.waitFor(status => status === (RoomStatus.BeingCreated | RoomStatus.Replaced)).promise;
+        const roomId = roomBeingCreated.roomId;
+        room = this._session.rooms.get(roomId);
+        return room;
+    }
 
+    private async joinRoomSpecifiedInConfig() {
+        const roomId = this._options.config["auto_join_room"];
+        let room = this._session.rooms.get(roomId);
+        if (!room) {
+            // user is not in specified room, so join it
+            await this._session.joinRoom(roomId);
+            // even though we've joined the room, we need to wait till the next sync to get the room
+            await this._waitForRoomFromSync(roomId);
+            room = this._session.rooms.get(roomId); 
+        }
+        return room;
     }
 
     private _waitForRoomFromSync(roomId: string): Promise<void> {
@@ -46,6 +80,8 @@ export class ChatterboxViewModel extends ViewModel {
                     resolve();
                 }
             },
+            onUpdate: () => undefined,
+            onRemove: () => undefined,
         };
         this._session.rooms.subscribe(subscription);
         return promise;
@@ -56,7 +92,7 @@ export class ChatterboxViewModel extends ViewModel {
     }
 
     get messageComposerViewModel() {
-        return this._messageComposerViewModel;
+        return this._roomViewModel?.composerViewModel;
     }
     
     get roomViewModel() {
diff --git a/src/viewmodels/RootViewModel.ts b/src/viewmodels/RootViewModel.ts
index 120714830478aee8eeb1541591c4a88ae208f906..b4f5484c6fd5058fcbc1622dade8ad366c3f5412 100644
--- a/src/viewmodels/RootViewModel.ts
+++ b/src/viewmodels/RootViewModel.ts
@@ -45,7 +45,7 @@ export class RootViewModel extends ViewModel {
                     loginPromise,
                 })
             ));
-            this._chatterBoxViewModel.loadRoom();
+            this._chatterBoxViewModel.load();
         }
         this.emitChange("activeSection");
     }
diff --git a/yarn.lock b/yarn.lock
index 9e6839395b1f64013ad7946ab0eaaff31ccbe86b..f90de2b2ba9803dfe5fb0731890b32cfb9d3e784 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -158,10 +158,10 @@ has@^1.0.3:
   dependencies:
     function-bind "^1.1.1"
 
-hydrogen-view-sdk@^0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/hydrogen-view-sdk/-/hydrogen-view-sdk-0.0.7.tgz#36c153088d7a2bfd3bfe478eb7b37af18e6abf7b"
-  integrity sha512-gmf7Qopjx+2S3DCnuQLS4oxtqLZNVHhAd+U1J8sAj3G1gO7YiAckjwsalnhFZpe0fQkBS/A07yZa4wh4/j4ajw==
+hydrogen-view-sdk@^0.0.8:
+  version "0.0.8"
+  resolved "https://registry.yarnpkg.com/hydrogen-view-sdk/-/hydrogen-view-sdk-0.0.8.tgz#9c9268cc96890568406393686717729d81a28635"
+  integrity sha512-n4Lr8mZZ//hpYCtnYCsr44Ep0bg9TwCQ5C4HiK+7gGeEeZvOYBp3HMDPMLGXp2mQId9ZrbL1cBRwq1ZfHiUTGw==
   dependencies:
     "@matrix-org/olm" "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz"
     another-json "^0.2.0"