         }
     }
 
-    func encodeWithCoder(aCoder: NSCoder) {
+    public func encodeWithCoder(aCoder: NSCoder) {
         aCoder.encodeObject(self.id, forKey: "id")
         aCoder.encodeObject(self.username, forKey: "username")
         if let authToken = self.authToken {

import Foundation
import KeychainAccess

class User: NSObject, NSCoding {

    let id: String
    let username: String
    var password: String?


        self.username = username
    }

    public required init(coder aDecoder: NSCoder) {
        if let username = aDecoder.decodeObjectForKey("username") as? String,
            let id = aDecoder.decodeObjectForKey("id") as? String {
                self.id = id
