pep8
remove only the users from the directory instead of totally emptying it
Add more values in settings for further testing
Add get_ldap_connection helper function
Use get_ldap_connection instead of ldap.initialize
minor improvement
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
Merge branch 'get_ldap_connection'

Conflicts:
	okupy/accounts/views.py
Catch exception in redirect as pointed out by mgorny at PR #41
Merge pull request #45 from tampakrap/noreversematch

Catch exception in redirect as pointed out by mgorny at PR #41