             }
             
             if let uuid = options["uuid"], secret = options["secret"] {
-                let tokenSign = JWT.encode(["uuid": uuid], algorithm: .HS256(secret))
+                let tokenSign = JWT.encode(["uuid": uuid, "type": "device"], algorithm: .HS256(secret))
                 login(["token":tokenSign]).then {(auth: Auth) -> Void  in
                     self.initNetwork(auth)
                     if self.enableSocket {

                
            }
            
            if let networkUuid = options["networkUuid"], apiKey = options["apiKey"] {
                let tokenSign = JWT.encode(["networkUuid": networkUuid], algorithm: .HS256(apiKey))
                login(["token":tokenSign]).then {(auth: Auth) -> Void  in
                    self.initNetwork(auth)
                    if self.enableSocket {

                }
            }
            
            if let uuid = options["deviceUuid"], secret = options["secret"] {
                let tokenSign = JWT.encode(["uuid": uuid, "type": "device"], algorithm: .HS256(secret))
                login(["token":tokenSign]).then {(auth: Auth) -> Void  in
                    self.initNetwork(auth)
                    if self.enableSocket {
