Login and Logout Servlet working with session and cookies