myapp/controllers/login.py:LoginController.signin()
The remainder of the LoginController.signin() processing is straightforward: check whether a redirect url was stored in the session and if so, retrieve it, clear the session and redirect the now-authenticated user to their original destination, in this instance /demo/privindex.
Otherwise, redirect the user to an appropriate default location, which just so happens to be /demo/privindex.
(If the User.authenticate() causes a NotAuthenticated exception the user is redirected back to the sign-in form at /login/index.)