.. _11: ====================== LoginController.signin ====================== .. image :: images/08.jpg :align: center :height: 544 :width: 923 :func:`myapp/controllers/login.py:LoginController.signin` The remainder of the :func:`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 :func:`User.authenticate` causes a :class:`NotAuthenticated` exception the user is redirected back to the sign-in form at ``/login/index``.)