Changed login from email to username; login hangs

Hello. I used the cookiecutter template but changed my login settings from e-mail to username afterwards. Dropped the DB to start from scratch and modified all the other user code.

For some reason now, the login page hangs for about 5 mins but eventually arrives at the redirect_url. I don’t get any errors or output in the console. The redirect_url itself loads fast according to the DJ toolbar. Something seems to be hanging in the allauth login view. Admin login works fine and uses the allauth workflow. I’m not overriding any forms or views that were not already default.

#settings.py
AUTH_USER_MODEL = "users.User"
LOGIN_REDIRECT_URL = "/portal/dashboard"
LOGIN_URL = "account_login"
ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True)
ACCOUNT_AUTHENTICATION_METHOD = "username"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "none"
ACCOUNT_ADAPTER = "xxx.users.adapters.AccountAdapter"
ACCOUNT_FORMS = {"signup": "xxx.users.forms.UserSignupForm"}
SOCIALACCOUNT_ADAPTER = "xxx.users.adapters.SocialAccountAdapter"
SOCIALACCOUNT_FORMS = {"signup": "xxx.users.forms.UserSocialSignupForm"}
#customer user model
class User(AbstractUser):

    first_name = CharField(_("First Name"), blank=True, max_length=255)
    last_name = CharField(_("Last Name"), blank=True, max_length=255)
    email = EmailField(_("email address"), unique=True)
    phone_number = CharField(max_length=10, validators=[validators.RegexValidator(regex=r'^(\d{10})$',message='Phone number must be 10 numbers',code='invalid_phone')], blank=True, null=True,verbose_name = "Phone Number")

    def get_absolute_url(self) -> str:
        return reverse("users:detail", kwargs={"pk": self.username})
#login.html
<form class="login" method="post" action="{% url 'account_login' %}">
  {% csrf_token %}

  <div class="mb-4">
    <label for="input-lg" class="form-label">Username</label>
    <div class="position-relative">
        {{form.login}}
    </div>
  </div>
  <div class="mb-4">
    <label for="input-lg" class="form-label">Password</label>
    <div class="position-relative">
        {{form.password}}
    </div>
  </div>
  {% if redirect_field_value %}
    <input type="hidden"
            name="{{ redirect_field_name }}"
            value="{{ redirect_field_value }}" />
  {% endif %}
  <button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
</form>

Happy to post more code but above are the main snippets. Any thoughts on what could be causing the delay? Or how I could test the allauth views and see where it’s getting hung up? Thank you!

Figured out my issue (sigh). Had nothing to do with the login. Apparently my redis server was not responding and would eventually timeout. Strange that the DJ toolbar wasn’t picking this up during the request.