only call response.getWriter() when we are about to send text/xml to the client, otherwise we end of calling both getWriter() and getOutputStream() - resulting in an illegal state.
refactored the sessionService to use a correct singleton initialization scheme. Added true authentication to ResourceHandler.
Add user name to SessionData object
Create replication directory. Move replication code there. Use log4j for replication logging (rollingfileappender). Beef up replication logging and error control.