fixed some login bugs