     
     private static var ID: String = UIDevice.current.identifierForVendor!.uuidString
     
+    private enum Keys: String {
+        case AUTH_TOKEN = "AUTH_TOKEN"
+        case SESSION_ID = "SESSION_ID"
+        case SESSION_PLAYER_ID = "SESSION_PLAYER_ID"
+        case SESSION_USERNAME = "SESSION_USERNAME"
+        case SESSION_MOD_TOKEN = "SESSION_MOD_TOKEN"
+        case SESSION_PLAY_TOKEN = "SESSION_PLAY_TOKEN"
+    }
+    
     private enum Command: String {
         case REQUEST_AUTH_TOKEN = "/token"
+        case CREATE_SESSION = "/session/username/"
     }
     
     public static func setHostAddress(address: String, port: Int = 4567) {

    }
    
    public static func request(command: String, parameters: Parameters, callback: Callback) {
        let object = storage.object(forKey: authTokenStorageKey)
        let token: String = (object != nil) ? ":\(object as! String)" : ""
        
        let headers: HTTPHeaders = [
            "Authorization": "\(ID)\(token)"
        ]
        
        Alamofire.request("\(HOST_ADDRESS)\(command)", method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: headers).responseJSON { response in

        
        public func onResponse(responseCode: Int, response: NSDictionary) {
            if(responseCode == 200) {
                storage.set(response["token"], forKey: Keys.AUTH_TOKEN.rawValue)
            }
            callback.onResponse(responseCode: responseCode, response: response)
        }
    }
    
    private class CreateSessionCallback: Callback {
        
        private var username: String
        private var callback: Callback
        
        public init(username: String, callback: Callback) {
            self.username = username
            self.callback = callback
        }
        
        public func onResponse(responseCode: Int, response: NSDictionary) {
            if(responseCode == 200) {
                storage.set(username, forKey: Keys.SESSION_USERNAME.rawValue)
                storage.set(response["sessionID"], forKey: Keys.SESSION_ID.rawValue)
                storage.set(response["playerID"], forKey: Keys.SESSION_PLAYER_ID.rawValue)
                storage.set(response["modToken"], forKey: Keys.SESSION_MOD_TOKEN.rawValue)
                storage.set(response["userToken"], forKey: Keys.SESSION_PLAY_TOKEN.rawValue)
            }
            callback.onResponse(responseCode: responseCode, response: response)
        }
        
    }
}
