In short the behaviour i want to accomplish is LOGIN->LOGOUT->LOGIN
My application starts with a login view. After authentication, it close and the MainView open: