Question on redirecting "valid" but unauthenticated pages back to default

So my default page is / and is a login page at this moment I have one other view /#!main when someone navigates to exaple from test localhost:8080/#!main having not hit / Vaadin or spring throws a visible error which i cannot seem to be able to change to just reidirect back to /. I know there is not much description here but im not really sure how else to describe this

I’m not sure how you are doing the authentication. If you are using Vaadin Spring and your views are implementing ViewAccessControl or ViewInstanceAccessControl, you should be able to set SpringViewProvider.setAccessDeniedViewClass()- maybe but your login view as that.

the issue i am running into is hitting these pages before hitting the main page is causing a visible error though i have not checked to see if turning Vaadin to production mode will reduce the information from these. See i have no issues with them accessing these pages using the fragment post login or even after they have hit the first page as then the redirect is handled normally but issue i am running into seems to be very low if almost in some of the core vaadin or spring itself that i cannot find a way to listen for as of yet. I will see if your suggestion brings me some paydirt(is successful)