             let c = Client(configuration: $0)
 			//AppActivity.end("Authenticate")
 			
-			NotificationCenter.default
-				.addObserver(forName: Client.didConnectNotification, object: c, queue: nil) { _ in
-                    //AppActivity.start("Setup")
-                    if c.conversationList == nil {
-                        c.buildUserConversationList {
-                            // When reconnecting, buildUserConversationList causes Client to then
-                            // re-create the entire userlist + conversationlist and reset it
-                            // but the old ones are still alive, and their delegate is set to the
-                            // conversations window; that means you'll receive double notifications.
-                            
-                            // TODO: FIXME: THIS IS A TERRIBLE DIRTY DISGUSTING HAX, DON'T DO ITS!
-                            NotificationCenter.default.post(name: ServiceRegistry.didAddService, object: c)
-                            //AppActivity.end("Setup")
-                        }
+            _ = subscribe(source: c, Client.didConnectNotification) { _ in
+                UserNotification(identifier: "Parrot.ConnectionStatus", title: "Parrot has connected.",
+                                 contentImage: NSImage(named: NSImageNameCaution)).post()
+                
+                //AppActivity.start("Setup")
+                if c.conversationList == nil {
+                    c.buildUserConversationList {
+                        // When reconnecting, buildUserConversationList causes Client to then
+                        // re-create the entire userlist + conversationlist and reset it
+                        // but the old ones are still alive, and their delegate is set to the
+                        // conversations window; that means you'll receive double notifications.
+                        
+                        // TODO: FIXME: THIS IS A TERRIBLE DIRTY DISGUSTING HAX, DON'T DO ITS!
+                        NotificationCenter.default.post(name: ServiceRegistry.didAddService, object: c)
+                        //AppActivity.end("Setup")
                     }
-                    
-                    /*DispatchQueue.main.async {
-                        let a = NSAlert()
-                        a.alertStyle = .critical
-                        a.messageText = "Parrot has connected."
-                        a.runModal()
-                    }*/
-                    //UserNotification(identifier: "Parrot.ConnectionStatus", title: "Parrot has connected.",
-                    //                 contentImage: NSImage(named: NSImageNameCaution)).post()
+                }
+                
 			}
-            NotificationCenter.default
-                .addObserver(forName: Client.didDisconnectNotification, object: c, queue: nil) { _ in
-                    DispatchQueue.main.async {
-                        let a = NSAlert()
-                        a.alertStyle = .critical
-                        a.messageText = "Parrot has disconnected."
-                        a.runModal()
-                    }
-                    //UserNotification(identifier: "Parrot.ConnectionStatus", title: "Parrot has disconnected.",
-                    //                 contentImage: NSImage(named: NSImageNameCaution)).post()
+            _ = subscribe(source: c, Client.didDisconnectNotification) { _ in
+                UserNotification(identifier: "Parrot.ConnectionStatus", title: "Parrot has disconnected.",
+                                 contentImage: NSImage(named: NSImageNameCaution)).post()
             }
             
             ServiceRegistry.add(service: c)

                }
            }
        }
    }
    let net = NetworkReachabilityManager(host: "google.com")
    
    /// If the Conversations window is closed, tapping the dock icon will reopen it.
    public func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {

			}
		}
		WebDelegate.delegate.authenticationTokens = nil
		NSApp.terminate(self)
	}
	
    ///
