Index: lams_central/web/login.jsp =================================================================== diff -u -r3dbf966d900adefc34cdad501d3c392118451cd9 -r1d4e6ef86b75dd66597b47527ff4d4adb89f39b0 --- lams_central/web/login.jsp (.../login.jsp) (revision 3dbf966d900adefc34cdad501d3c392118451cd9) +++ lams_central/web/login.jsp (.../login.jsp) (revision 1d4e6ef86b75dd66597b47527ff4d4adb89f39b0) @@ -174,9 +174,13 @@ <% // invalidate session so a new user can be logged in - SessionManager.removeSession(((UserDTO) SessionManager - .getSession().getAttribute("user")).getLogin(), - true); + HttpSession hs = SessionManager.getSession(); + if (hs != null) { + UserDTO userDTO = (UserDTO) hs.getAttribute("user"); + if (userDTO != null) { + SessionManager.removeSession(userDTO.getLogin(), true); + } + } %>