login error handled better