protected void requestHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
				
		String login = request.getParameter("login");
		String password = request.getParameter("password");
		String mensagem = null;
		Usuario usuario = null;
		String action = request.getParameter("action");
		HttpSession session = request.getSession(true);
		
		if(action != null && action.equals("logout")){
			session.removeAttribute("usuarioLogado");
			response.sendRedirect("login");
		}else{
			if(login != null && !login.equals("") && password != null && !password.equals("")){
				//faz login	
				UsuarioDAO dao = new UsuarioDAO();
				usuario = dao.makeLogin(login, password);
				if(usuario != null){
					session.setAttribute("usuarioLogado", usuario);
					if(usuario.getIsAdmin() == 1){ 
						response.sendRedirect("turma");
					}else{
						response.sendRedirect("nota");
					}
				}else{
					mensagem = "Login ou senha invalidos";
				}
			}
			
			if(usuario == null){
				request.setAttribute("mensagem", mensagem);
				RequestDispatcher dispatcher = request.getRequestDispatcher("login/login.jsp");
				dispatcher.forward(request, response);
			}
		}
		
	}