Fixed more login bugs