Login redirects and error states
Use the Demo Projects HQ login form to see how one submit flow can redirect on success, stay put on failure, and still keep the user oriented.
Login shows a split success and failure path
Section titled “Login shows a split success and failure path”The Demo Projects HQ login page is useful because success and failure do not end in the same place. A valid login redirects into the app, while invalid credentials keep the user on the page with focused feedback. That is the real submission contract this tour explains.
The login form owns both redirect and error behavior
Section titled “The login form owns both redirect and error behavior”#login_form is more than a submit wrapper. It posts to the login action, redirects with browser.goto('/') on success, and keeps its error branches on the same page when authentication fails. That makes it a good example of a form with asymmetric outcomes.
Success leaves the page on purpose
Section titled “Success leaves the page on purpose”A successful login should not simply clear the form and stay put. Demo Projects HQ redirects into the app because the user’s context has genuinely changed. That makes the success branch feel final instead of ambiguous.
The submit control shows the request is in flight
Section titled “The submit control shows the request is in flight”#login-submit disables itself and swaps into a signing-in state while the request is executing. That keeps the redirect path honest too, because the user can see the form is actively working before the page changes.
Failure stays local and explainable
Section titled “Failure stays local and explainable”When login fails, the page stays where it is and uses focused error branches for invalid credentials and broader request failures. That is the right counterweight to success redirects: the form preserves context when the user still has work to do.
Conclusion
Section titled “Conclusion”The login page works because the submit flow resolves in two honest directions: a successful session leaves the page, while a failed session stays on the page with focused feedback. That is the right pattern whenever a form has a meaningful post-submit branch.