Move import to inside authenticate()

Fixes Django 1.7 app registry error