fix login validation issue