public User authenticate(String login, String password) {
		User found = new User();
		String jpql = "select d from User d where d.login=:p1 and d.pwd=:p2";
		Query query = u.createQuery(jpql);
		query.setParameter("p1", login);
		query.setParameter("p2", password);
		try{
			found = (User) query.getSingleResult();
		}catch(Exception e){
		}
		return found;
	}