Fixed login looping bug caused by host changes