edit for working login, but still has console errors