public String login(HttpServletRequest request, HttpServletResponse response) throws NoSuchAlgorithmException,
IOException {
request.setCharacterEncoding("UTF-8");
String username = request.getParameter("username");
String password = request.getParameter("password");
User user = new User();
user.setUsername(username);
user.setPassword(password);
if (userService.login(user)) {
request.getSession().setAttribute("user", user);
response.sendRedirect("/portal/histran/index");
return null;
}