LoginServlet and RestoreSessionServlet upgraded