Added "invalid login" check and error