     }
 
     func url() -> NSURL? {
-        if let string = Token.URLSerializer.serialize(token) {
-            return NSURL(string: string)
+        if let token = token {
+            if let string = Token.URLSerializer.serialize(token) {
+                return NSURL(string: string)
+            }
         }
         return nil
     }

        return nil
    }
}

    var isInKeychain: Bool { return (keychainItemRef != nil) }

    func saveToKeychain() -> Bool {
        if let token = token {
            if let keychainItem = self.keychainItem {
                if let newKeychainItem = updateKeychainItemWithToken(keychainItem, token) {
                    self.keychainItem = newKeychainItem
                    return true
                }
                return false
            } else {
                if let newKeychainItem = addTokenToKeychain(token) {
                    self.keychainItem = newKeychainItem
                    return true
                }
                return false
            }
        }
        return false
    }

    func removeFromKeychain() -> Bool {
