login: obtain 'next' in a common call.
Set session expiration in settings.
Re-display login on 'Cancel' without hackery.
login: Drop duplicate 'Cancel' code.
login: Commonize the after-auth login code.
login: Use OkupyError in wider scope.
login: Reuse request.user.is_authenticated() after login.
login: reorder the conditionals to keep it cleaner.

We're going to have even more conditions for method == 'POST', so keep
it as elif/else.
Merge pull request #44 from mgorny/login-cleanup

Login cleanup