Added log4j2 for logging and fixed sessions