 			NSUserDefaults.standardUserDefaults().setObject(user, forKey: "user")
 			NSUserDefaults.standardUserDefaults().synchronize()
 			let u = JSON(user)
-			println("signup user \(u)")
-			callback(User(u), error)
+			println("signUp user \(u)")
+			callback(User(json: u), error)
 		}
 	}
 }

	}
}

public func ||<T>(left: Query<T>, right: Query<T>) -> Query<T> {
	let query = Query<T>(left.object)
	query.constraints.append(.Or(left: left.constraints, right: right.constraints))
	return query
}

public struct User {
	
	let json: JSON
	
	init(_ json: JSON) {
		self.json = json
	}
	
	var username: String {
		return json["username"].string!
	}
	
	func loginSession(block: (NSError?) -> Void) {
		dispatch_group_notify(manager_init_group, dispatch_get_main_queue()) {
			if var headers = parseManager!.session.configuration.HTTPAdditionalHeaders {
				headers["X-Parse-Session-Token"] = self.json["sessionToken"].string
				parseManager!.session.configuration.HTTPAdditionalHeaders = headers
			}
			parseRequest(.GET, "/users/me", nil) { (json, error) in

	case DoNotMatchQuery(key: String, dontMatchKey: String, inQuery: Constraints, search: Search)
	case MatchRegex(key: String, match: NSRegularExpression)
	case Or(left: Constraints, right: Constraints)
	case In(key: String, collection: [AnyObject])
	case NotIn(key: String, collection: [AnyObject])
	case RelatedTo(key: String, className: String, objectId: String)
	
	func whereClause(inout param: [String: AnyObject]) {
		switch self {
		case .GreaterThan(let key, let object):
			param[key] = ["$gt": object]
