Work in Progress - fixing some login bugs