Refactor LoginLogoutController.java