Add support of swappable User model

Due to some changes in `User` API, this pull request is backward incompatible with Django 1.4