public List <User> judge(String userName, String password) {
		log.debug("judge is invoked");
		PreparedStatement statement = null;
		try{
			statement = getPreparedStatement(JudgeLogin);
			statement.setString(1, userName);
			statement.setString(2, password);
			ResultSet res = statement.executeQuery();
			List <User> res_users = new ArrayList<User>();
			if(res.next()){
				log.debug("login uid is " + res.getInt("uid"));
				res_users.add(new User(res.getInt("uid"), res.getString("username"), 
						res.getString("password"), res.getInt("motion"),
						res.getInt("motoinLevel"), res.getString("signature"),
						res.getInt("sex"), res.getInt("lat"), res.getInt("lon"),
						res.getInt("state")));
				return res_users;
			}
			else
				return null;
		}
		catch(Exception e){
			e.printStackTrace();
			return null;
		}
		finally {
			if(statement == null)
				return null;
			try {
				Connection conn = statement.getConnection();
				statement.close();
				conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}