login error checking added