suggestion on rerouting users to loginpage and rerouting back to their previous page.
so while working on my final year project, i decided to allow the users to browse through the up without having to be logged in since theres's this thing in UX/UI that says forcing users to login before viewing anything on an app is a deterrent.
so i am asking for you options on how to allow the user to browse through till where they'll have to make a booking or lets say till they get to the checkout page for example. now before they click on the place order button, i want to redirect them to login or register page and then sending them back to the order page.
Well you have multiple options there, but I think the best solution is using a session. You simply store their order in the session and when a user logs in you check if you have an order in the session. If you have you simply redirect them to the correct page and apply the order on that page ;)