     }
 }
 
-public struct APIToken
+@objc
+public class APIToken : NSObject
 {
     var refreshToken:String
     var tokenType:String

    var expiresIn:Int
    var scope:String
    var email:String
}

open class APITokenManager
{
    public static var currentToken:APIToken? {
        if let email = self.object(for: .emailKey) as? String,

            self.set(object: accessToken, for: .accessTokenKey)
            self.set(object: expiresIn, for: .expiresKey)
            self.set(object: scope, for: .scopeKey)
            
            //save tokens for specific email key (helps differntiate between multiple signed accounts)
            UserDefaults.standard.set(accessToken, forKey: APITokenManager.accessTokenKey(for: email))
            UserDefaults.standard.set(refreshToken, forKey: APITokenManager.refreshTokenKey(for: email))
            return self.currentToken
        }
        return nil
