modified check for Login and Password fields