Fix bug where login was failing