text: from django.contrib.auth.forms import UserCreationForm
  from django.contrib.auth.models import User
  from django import forms
  from django.core.exceptions import ValidationError
  from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
  from bootstrap_modal_forms.mixins import PopRequestMixin, CreateUpdateAjaxMixin
  
  class CustomUserCreationForm(PopRequestMixin, CreateUpdateAjaxMixin, UserCreationForm):
      """
      Form required by BSModal signup 
      """
      class Meta:
          model = User
          fields = ['username', 'password1', 'password2']
  
  class CustomAuthenticationForm(AuthenticationForm):
      """
      Form required by BSModal login
      """
      class Meta:
          model = User
          fields = ['username', 'password']
  