title: Unable to login because Django saving passwords in plain text but
body: <pre><code>class UserManager(BaseUserManager):
  
      def create_user(self, username, email, password=None):
          if username is None:
              raise TypeError('User should have a username')
          if email is None:
              raise TypeError('User should have an email')
  
          user = self.model(
              username=username,
              email=self.normalize_email(email)
          )
          user.set_password(password)
          user.save(using=self._db)
          return user
  
  
      def create_superuser(self, username, email, password=None):
          if password is None:
              raise TypeError('Password should not be none')
  
          user = self.create_user(username, email, password)
          user.is_superuser = True
          user.is_staff = True
          user.save()
          return user
  
  
  
  class User(AbstractBaseUser, PermissionsMixin):
      
      username = models.CharField(
          max_length = 255,
          unique = True,
          db_index = True
      )
      email = models.EmailField(
          max_length = 255,
          unique = True,
          db_index = True
      )
      is_verified = models.BooleanField(default = False)
      is_staff = models.BooleanField(default = True)
      is_active = models.BooleanField(default = True)
  
      USERNAME_FIELD = 'email'
      REQUIRED_FIELDS = ['username']
  
      objects = UserManager()
  
      def __str__(self):
          return self.email
  
      def tokens(self):
          refresh = RefreshToken.for_user(self)
          return {
              'refresh': str(refresh),
              'access': str(refresh.access_token)
          }
  
  
  class RegisterSerializer(serializers.ModelSerializer):
  
      
      password = serializers.CharField(
          max_length = 255,
          min_length = 6,
          write_only = True
      )
  
      class Meta:
          model = User
          fields = ['email', 'username', 'password']
          extra_kwargs = {'password': {'write_only': True, 'min_length': 5}}
  
          def validate(self, attrs):
              email = attrs.get('email', '')
              username = attrs.get('username', '')
  
              if not username.isalnum():
                  raise serializers.ValidationError(
                      &quot;Username should contain only alphanumeric characters&quot;
                  )
              return attrs
  
  
          def create(self, validated_data):
              return User.objects.create_user(**validated_data)
  
  
  
  class RegisterView(generics.GenericAPIView):
  
      permission_classes = (AllowAny,)
      serializer_class = RegisterSerializer
  
      def post(self, request):
          serializer = self.serializer_class(data=request.data)
          serializer.is_valid(raise_exception=True)
          serializer.save()
          user_data = serializer.data
  
          return Response(
              serializer.data,
              status=status.HTTP_201_CREATED
          )
  </code></pre>
  <p>Currently I'm using <code>django 3.1.3</code> and <code>djangorestframework 3.12.2</code>. While I'm able to login with superuser and getting tokens properly but couldn't login with staff users. From Django admin I have seen only superuser has hashed password and all other users have plain text password.</p>