Use get_user_model() instead of referencing the User model directly

This just pulls a bunch of stuff out of #746 to make it a little less terrifying to review.