             button.action = #selector(statusItemClick)
         }
         
-        
-        
     }
 
     func applicationWillTerminate(_ aNotification: Notification) {
         // Insert code here to tear down your application
     }
 
+    func portalBaseUrl() -> String {
+        return "http://localhost:\(portalPort())"
+    }
+    
+    func portalPort() -> Int {
+        return isDevModeEnabled ? developmentModePortalPort : productionModePortalPort
+    }
+    
     func openPortalClick(sender: AnyObject?) {
-        
+        NSLog("openPortalClick")
+        openPortal(path: "/")
+    }
+    
+    func openPortal(path: String?) {
+        let portalURL = URL(string: "\(portalBaseUrl())\(path ?? "/")")
+        NSLog("Opening portal with URL: \(portalURL)")
+        NSWorkspace.shared().open(portalURL!)
     }
     
     func statusItemClick(sender: AnyObject?) {

    let corsProxyPort = 1337
    let coreProxyPort = 6270
    
    var statusItem : NSStatusItem = NSStatusItem()
    
    var isDevModeEnabled : Bool = false

        if showExpandedMenu {
            
            let portalPortMenuItem = NSMenuItem()
            portalPortMenuItem.title = "Portal proxy running on port \(portalPort())"
            portalPortMenuItem.isEnabled = false
            menu.addItem(portalPortMenuItem)
            
