public String execute() throws IOException{
		
		/* connect database */
    	String resource = "orm/configuration.xml";
		Reader reader = Resources.getResourceAsReader(resource);
		SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);
		SqlSession session = sessionFactory.openSession();
		
		try{
			email=servletRequest.getParameter("email");
			password=servletRequest.getParameter("password");
			
			if(email.equals("")){
	    		JOptionPane.showMessageDialog(null,"Please input email address!","Message",JOptionPane.ERROR_MESSAGE);
	            return "retry";
			}
			
			if(password.equals("")){
	    		JOptionPane.showMessageDialog(null,"Please input password!","Message",JOptionPane.ERROR_MESSAGE);
	            return "retry";
			}
			
			userlist=session.selectList("selectuserbyemail",email);
			if(userlist.isEmpty()){
				JOptionPane.showMessageDialog(null,"This email address is not in record!","Message",JOptionPane.ERROR_MESSAGE);
	            return "retry";
			}else{
			u=userlist.get(0);
			if(password.equals(u.getPwd())){
				/* set session */
			    ActionContext.getContext().getSession().put("email",email);   
				return "loginok";
			}else{
				JOptionPane.showMessageDialog(null,"Wrong Password!","Message",JOptionPane.ERROR_MESSAGE);
	            return "retry";
			}
			
			}
			
		}finally{
			session.close();
		}
		
		
		
		
	}