Hide component when dismiss initial view

I have an initial view (my Home Page) and if you have logged in, you the first page you see is also the home page.
But i want that the login part is getting hidden if you login and it should be shown if you logout. I tried many things, but everytime it’s not working. I set the hide and show component flow functions in the login and logout logic flow of my buttons, but it does not work. I also tried to use app variable, but the same result. Everytime the components aren’t hidden or doesn’t get back shown.