 extension User: JSONConvertible {
     
     convenience init(json: JSON) throws {
-        self.init(username: try json.get("username"),
-                  password: try json.get("password"),
-                  id: try json.get("id"),
-                  firstName: try json.get("firstName"),
-                  lastName: try json.get("lastName"),
-                  email: try json.get("email"))
+        self.init(username: try json.get("username") ?? nil,
+                  password: try json.get("password") ?? nil,
+                  id: try json.get("id") ?? nil,
+                  firstName: try json.get("firstName") ?? nil,
+                  lastName: try json.get("lastName") ?? nil,
+                  email: try json.get("email") ?? nil)
     }
     
     func makeJSON() throws -> JSON {

    
    let storage = Storage()
    
    let username: String
    var password: String
    var firstName: String? = nil
    var lastName: String? = nil
    var email: String? = nil

    }
    
    public var hashedPassword: String? {
        guard let password = password else { return nil }
        let digest = try! _hash.make(password)
        return digest.makeString()
    }
