     }
 
     func url() -> NSURL? {
-        guard let token = token else {
+        guard let token = tokenForOTPToken(self) else {
             return nil
         }
         return Token.URLSerializer.serialize(token)

        }
    }

    public convenience init(token: Token) {
        self.init()
        updateWithToken(token)
    }

    public func validate() -> Bool {
        return (token != nil)
    }
}


    private static var defaultInitialCounter: UInt64 = 0
    private static var defaultPeriod: NSTimeInterval = 30

    private func updateWithToken(token: Token) {
        self.name = token.name
        self.issuer = token.issuer

