# KALite Login button takes a long time to activate with many users

**URL:** <https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505>\
**Category:** KA Lite\
**Created:** [February 20, 2018, 10:12pm UTC](https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505 "2018-02-20T22:12:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdouglas](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@cdouglas](https://community.learningequality.org/u/cdouglas)\
**Post date:** [February 20, 2018, 10:12pm UTC](https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505/1 "2018-02-20T22:12:25Z")

</div>

Hello,  
I loaded over 18,000 users in my KALite database and now the login button stays grayed out for up to 2 minutes, then turns full red and you are able to login. I am guessing it is prefetching all of the accounts. IS it possible to disable this prefetch or add an index to the table to speed this up?

Thank you  
Chris

---

<div class="post-metadata">

**Author:** ![mrpau-eugene](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mrpau-eugene](https://community.learningequality.org/u/mrpau-eugene)\
**Post date:** [February 26, 2018, 2:55am UTC](https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505/2 "2018-02-26T02:55:22Z")

</div>

@cdouglas Are you using simplified login? It was because of this PR, it fetches all users from the database. I think disabling simplified login would work.

In your `~/.kalite/settings.py`, try adding `SIMPLIFIED_LOGIN = False`

It’s disabled by default

---

<div class="post-metadata">

**Author:** ![cdouglas](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@cdouglas](https://community.learningequality.org/u/cdouglas)\
**Post date:** [February 26, 2018, 8:42am UTC](https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505/3 "2018-02-26T08:42:23Z")

</div>

Hello,  
That’s exactly what I found last week, that when you turn on simplified login, it turns on autocomplete. But I need simplified login, so I edited the code to not use autocomplete when you turn on simplified login.

-Chris

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [February 26, 2018, 9:01am UTC](https://community.learningequality.org/t/kalite-login-button-takes-a-long-time-to-activate-with-many-users/505/4 "2018-02-26T09:01:22Z")

</div>

Hi @cdouglas

We originally had a limit of 1,000 users for simplified login to work. I guess it was a strange way of solving the fundamental issue, that a list of all usernames seems to be transmitted to the client side 😊

You can see more background here: [https://github.com/learningequality/ka-lite/pull/5527](https://github.com/learningequality/ka-lite/pull/5527)

Please feel free to contribute a solution to this or perhaps get in touch with Edulution about it, since they would seem to share this interest.

Best,  
Ben
