Login validation fixed