You were right. I went back and rewrote most of the login process while adding shortcuts wherever possible. It was terribly convoluted and I managed to optimize it severely (at least that's what I think). Now, logins seem quite faster. Best thing about it? it only took a couple hours