     class func loadAccount() ->useAccount?{
         let path = (NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).last! as NSString).stringByAppendingPathComponent("account.plist")
         if let account = NSKeyedUnarchiver.unarchiveObjectWithFile(path) as? useAccount {
-        return account
+            //判断用户的token是否过期
+            if account.expires_date?.compare(NSDate()) == NSComparisonResult.OrderedDescending {
+                return account}
         }
         return nil
     }

        uid = aDecoder.decodeObjectForKey("uid") as? String
        avatar_large = aDecoder.decodeObjectForKey("avatar_large") as? String
        name = aDecoder.decodeObjectForKey("name") as? String
        
    }
    //归档

        
    }
    override var description : String {
        let keys = ["access_token","expires_in","uid","avatar_large","name","expires_date"]
    return dictionaryWithValuesForKeys(keys).description
    }
    //归档
