public Customer customerLogin(String username, String password) {

		Customer customer;
		try {
			customer = (Customer) this.em.createNamedQuery("findByEmail")
					.setParameter("paramEmail", username).getSingleResult();
			if (!customer.getPassword().equals(password)) {
				throw new Exception();
			}
		} catch (Exception e) {
			customer = null;
		}
		return customer;

	}