[ionic 4] - How to disable swipe back /go back

is there some possibility to disable swipe back (on iOS) and go back (and android) for each component/page separately?

E.G. When user log out from app, he is redirected to the login page, but now, when he goes back, he get the profile page :-/

So if swiping back is not possible to disable, is there some way to prevent this behavior?