How to stop redirect to login page after click F5? Server Side Rendering with Angular 10

I have the following problem with Server Side Rendering with angular 10. Everything fine good. But when I login in my app and I fresh the page with F5, first I see the login screen and after the 1 second application redirect me to the current page. On refresh I don’t want to see login screen. When I don’t use SSR everything work as expected.

How can I fix it?

Source: Angular Questions