Building Login System using SwiftUI

Hi guys, So I'm Still pretty new to SwiftUI and wondering on how I can implement the following. I create multiple pages (Views) with SwiftUI and I have a home page and other pages. However, I also have a login page and I want to lock the user to the Login page first and stuck on that page before being able to see the other pages. So far I have the log in page fully working where it sends the username/password data to my server and my server authenticates it and returns if its correct or not. But the main question for me is how do I make SwiftUI change pages after the server returns true after trying to log in.

Building Login System using SwiftUI
 
 
Q