patch from

https://github.com/xchataqua/xchataqua/commit/418d0c36fdd9f5e1f97c9614b9814c54c766a956#commitcomment-7165928
login type