Modified LoginController so that it's more self contained (fewer public setters, a proper login() and logout() method). Adde login and logout listeners