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
Make uWSGI auto-reload okupy on changes.
Merge pull request #42 from mgorny/uwsgi-reload

Make uWSGI auto-reload okupy on changes.
WSGI: Fix running in django's built-in server.

The 'uwsgi' module is only available when running from uWSGI.
login: obtain 'next' in a common call.
Set session expiration in settings.
Merge pull request #43 from mgorny/uwsgi-reload

WSGI: Fix running in django's built-in server.
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