             // For now basic profile, (demands empty dicts)
             roles[role.rawValue] = [:]
         }
-        var details = self.details
+        
+        var details: [String: AnyObject] = [:]
+        
+        if let authmethods = self.authmethods {
+            details["authmethods"] = authmethods
+        }
+        if let authid = self.authid {
+            details["authid"] = authid
+        }
+        if let authrole = self.authrole {
+            details["authrole"] = authrole
+        }
+        if let authextra = self.authextra {
+            details["authextra"] = authextra
+        }
+        
         details["agent"] = self.clientName
         details["roles"] = roles
         self.sendMessage(HelloSwampMessage(realm: self.realm, details: details))

    // MARK: Members
    private let realm: String
    private let transport: SwampTransport
    private let details: [String: AnyObject]
    
    // MARK: State members
    private var currRequestId: Int = 1
    
    // MARK: Session state
    private var serializer: SwampSerializer?
    public var sessionId: Int?
    private var routerSupportedRoles: [SwampRole]?
    
    // MARK: Call role

    private var unsubscribeRequests: [Int: (subscription: Int, callback: UnsubscribeCallback, errorCallback: ErrorUnsubscribeCallback)] = [:]
    
    // MARK: C'tor
    required public init(realm: String, transport: SwampTransport, authmethods: [String]?=nil, authid: String?=nil, authrole: String?=nil, authextra: [String: AnyObject]?=nil){
        self.realm = realm
        self.transport = transport
        self.authmethods = authmethods
        self.authid = authid
        self.authrole = authrole
        self.authextra = authextra
        self.transport.delegate = self
    }
    
    // MARK: Public API
    
    final public func isConnected() -> Bool {
        return self.sessionId != nil
    }
    
    final public func connect() {
        self.transport.connect()
    }
    
    final public func disconnect(reason: String="wamp.error.close_realm") {
        self.sendMessage(GoodbyeSwampMessage(details: [:], reason: reason))
    }
    
    // MARK: Caller role
