Return to initial view crash - 2.8.28

I’ve implemented the login with authorization in this way:
Login page set up as auth login page–> once user is authenticated, a dismiss view is fired up
Logout page–> once clicked, a remove local session logic is fired up and the a return to initial view is executed.

Return to initial view crashes with the error: Unable to execute operation since the view doesn’t exists.

Where I wrong? I guess that logic “dismiss initial view” on login page and the “return to initial view” are correct.
Please help me on this bug that is affecting my app