Process Flow - Protected routes in frontend
User tries to access route
Check if user is logged in
User stays [User logs in
When a user tries to visit a protected page, the app checks if they are logged in. If yes, it shows the page. If not, it sends them to login.