fixing login bugs