Fixup unit tests with Django 1.6 compatibility

I included @d9pouces changes from #29 and I fixed up the tests. Apparently, in Django 1.6 you have to configure the Django settings before importing `login`, `logout` or `authenticate`.