@Override
	public JSONObject main(Map<String, String> params, Session session)
			throws Exception {
		JSONObject rtn = new JSONObject();
		
		String username = params.get("username");
		String passwordClear = params.get("password");
		String fullName = "";
		String email = "";
		if(params.containsKey("fullName")) fullName = params.get("fullName");
		if(params.containsKey("email")) email = params.get("email");
		
		// check user exist
		if(User.findOne("username", username) != null) {
			rtn.put("rtnCode", this.getRtnCode(201));
			return rtn;
		}
		
		User.create(username, passwordClear, fullName, email);
		rtn.put("rtnCode", this.getRtnCode(200));
		
		return rtn;
	}